Paper icon indicating copy to clipboard operation
Paper copied to clipboard

feat #12164: Add events for Creaking heart and Eyeblossom blocks

Open Guilherme-Corvelo opened this issue 7 months ago • 5 comments

  • Introduced CreakingHeartTransformEvent and EyeblossomTransformEvent to the API, enabling plugins to monitor and control state transitions of Creaking Heart and Eyeblossom blocks.
  • Ensured all state changes for Creaking Heart (AWAKE, DORMANT, UPROOTED) and Eyeblossom (OPEN, CLOSED) are routed through their respective events, preventing untracked transitions.
  • Added CreakingHeartState enum to the API for stable plugin-side state referencing, decoupling plugin logic from NMS internals.
  • Implemented CreakingHeartProtectorChangeEvent to allow plugins to intercept protector (Creaking mob) spawn and removal.
  • Updated server-side logic to convert NMS state enums to API enums before firing events, ensuring API consistency.

These changes enhance plugin interoperability, event-driven extensibility, and long-term maintainability of custom block behaviors.

Guilherme-Corvelo avatar Jun 07 '25 16:06 Guilherme-Corvelo

For the EyeblossomTransformEvent: This should also be called when a potted eyeblossom opens/closes - FlowerPotBlock around line 163 or so

Brokkonaut avatar Jun 08 '25 04:06 Brokkonaut

Thanks a lot for all the suggestions and feedback! I really appreciate the thorough reviews. We’ll address each of the points as soon as we can. Thanks again for taking the time to go through the changes!

Guilherme-Corvelo avatar Jun 08 '25 15:06 Guilherme-Corvelo

Good evening, we've addressed the suggested changes — thank you all for the thorough feedback and helpful reviews!

Let us know if there's anything else we should take a look at. Really appreciate the guidance!

Guilherme-Corvelo avatar Jun 16 '25 16:06 Guilherme-Corvelo

Please disregard the latest version. That version has missing code. We will push a new, corrected version, in a few minutes.

AfonsoMendoncaJacinto avatar Jun 16 '25 17:06 AfonsoMendoncaJacinto

The latest requested changes have been executed. Thanks again, and in advance, for your support.

AfonsoMendoncaJacinto avatar Jun 16 '25 18:06 AfonsoMendoncaJacinto