Repository navigation
Only set emptyCrystalRespawnAllowed if the fight actually started (fix #14254 regression) - #14333
Open
WouterGritter wants to merge 2 commits into
Open
WouterGritter wants to merge 2 commits into
WouterGritter wants to merge 2 commits into
Conversation
Fixes regression introduced by PaperMC#14254
Warriorrrr
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes regression introduced by #14254
emptyCrystalRespawnAllowedis set to true when an empty crystal collection is given, regardless of if the fight was actually started (this.handle.respawnDragon()may return false). If a fight was already in progress, Bukkit'sinitiateRespawn()correctly returns false, but theemptyCrystalRespawnAllowedflag will have been set. Eventhough the next fight may be initiated because of something else thanCraftDragonBattle.initiateRespawn(emptySet()), it would then still allow the fight to start with no crystals.This works because vanilla's
respawnCrystals.isEmpty()check which the previous PR amended with&& !this.emptyCrystalRespawnAllowedonly occurs on the next tick afterhandle.respawnDragon(), though I do wonder if it's cleaner to make vanilla'srespawnDragonconsume theemptyCrystalRespawnAllowedflag instead, only actually setting it for this fight if the dragon was able to respawn. That's a larger diff, though.