Is your feature request related to a problem?
Currently the PortalCreateEvent does not handle the end portal creation, and therefore does not allow to prevents its creation by cancelling the event, or execute custom behavior depending on the entity or blocks involved.
Describe the solution you'd like.
PortalCreateEvent should handle the end portal creation on the overworld.
Probably it should also handle other portal-like creations like:
- Creation of an end gateway
- Creation of the portal on the end fountain
Describe alternatives you've considered.
I have currently created this branch with a possible implementation:
main...Biquaternions:Paper:feat/end-portal-creation-event
Patch on pastes.dev in case I update the branch and the diff mutates:
https://pastes.dev/gc3AVzYTde
This implementation has the following behavior:
- The player consumes the eye of ender when placing it on a frame
- The frame updates to hold the eye
- The PortalCreateEvent event gets fired
Observations:
- If the PortalCreateEvent is cancelled, the player will have consumed the eye of ender, and the portal frame will be unusable in the future, given the frames are unbreakable and the eyes cannot be removed to cause a future update.
- The server still triggers the end portal creation event and sends the corresponding packet (ClientboundLevelEventPacket).
- It does not account for the portal creation during world generation.
Other
No response
Is your feature request related to a problem?
Currently the PortalCreateEvent does not handle the end portal creation, and therefore does not allow to prevents its creation by cancelling the event, or execute custom behavior depending on the entity or blocks involved.
Describe the solution you'd like.
PortalCreateEvent should handle the end portal creation on the overworld.
Probably it should also handle other portal-like creations like:
Describe alternatives you've considered.
I have currently created this branch with a possible implementation:
main...Biquaternions:Paper:feat/end-portal-creation-event
Patch on pastes.dev in case I update the branch and the diff mutates:
https://pastes.dev/gc3AVzYTde
This implementation has the following behavior:
Observations:
Other
No response