Handle end portal creation with PortalCreateEvent
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
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:
https://github.com/PaperMC/Paper/compare/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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked implementation branch and the PortalCreateEvent behavior described in the issue, including the three listed portal scenarios. Verify the cancellation and client/event behavior, item and frame state, and world-generation scope; done means the agreed end-portal handling addresses the caveats identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100