Conversation
|
The issue with this change is the javadoc of the method still mention null/empty like a valid input for make the respawn cannot be canceled (destroy the crystals). Maybe the fix can be add a temp field in the NMS EnderDragonFight like |
|
@Doc94 Thanks for pointing it out, and you're right about the javadoc. Empty or null crystals is documented as intentionally making the respawn uncancellable, not something to reject. Reverted the earlier fix and added the ignoreEmptyCrystalsToRespawn flag on EnderDragonFight like you suggested: set to true when initiateRespawn gets empty/null crystals, tick() skips the abort in that case, resets to false once respawn hits END. |
|
Thanks @CozREV if you can check the CONTRIBUTION file and move this change from feature to simple patchs can review this later. |
|
@Doc94, moved it to a simple per-file patch on EnderDragonFight.java instead of a standalone feature patch |
Doc94
left a comment
There was a problem hiding this comment.
The // Paper comments maybe can include a detail like
// Paper - Support for disable cancel dragon respawn if not crystals are found
Now i see the implementation maybe the field can has a better name, related to the "abortRespawnSequence" if any wanna suggest another name if not its fine...
|
@Doc94 Renamed the field to abortEmptyCrystalsRespawn which somewhat resembles abortRespawnSequence, restored the exit-portal comment, and fixed the extra blank-line diff. |
Doc94
left a comment
There was a problem hiding this comment.
Not totally sure about the field name but if a better name can be changed before the merge.
|
@Doc94 Renamed to emptyCrystalRespawnAllowed, hopefully clearer about intent. |
~ ~ ~ ~ ~ ~ ~ ~ .git/COMMIT_EDITMSG [unix] (00:22 24/09/2026) 1,1 All "/e/dev/Open Source/Paper/.git/COMMIT_EDITMSG" [unix] 17L, 700B Add emptyCrystalRespawnAllowed flag to EnderDragonFight
Rebased the branch onto the latest upstream main to resolve the patch conflict flagged by GitHub. Squashed the previous commits into one and regenerated EnderDragonFight.java.patch against the current base — no functional changes to the fix itself, same emptyCrystalRespawnAllowed logic as before. Verified: compiles cleanly (BUILD SUCCESSFUL).
b811075 to
f9767b3
Compare
DragonBattle#initiateRespawn(Collection<EnderCrystal>)would startthe respawn sequence (setting phase to START) even when the filtered
crystal list ended up empty, since
EnderDragonFight#respawnDragondoesn't validate its input. The next tick would then immediately
abort the sequence back to NONE, since
EnderDragonFight#tickrequiresnon-empty respawnCrystals to proceed.
This adds a check for an empty filtered crystal list before calling
respawnDragon, returning false instead of silently starting and then
aborting the sequence.
Only addresses the
initiateRespawn(Collection)case described inthe issue — the no-arg
initiateRespawn()andresetCrystals()casesare still open.
Verified this compiles cleanly (
./gradlew compileJava) and the devserver boots correctly with the change. Have not verified in a live
client yet.
Related to #14183