#1337: Add DragonBattle#setPreviouslyKilled

By: DaFeist <56165444+dafeist-github@users.noreply.github.com>
This commit is contained in:
CraftBukkit/Spigot 2024-01-17 18:23:36 +11:00
parent 753db7f2fc
commit f4f370e55e
2 changed files with 14 additions and 0 deletions

View file

@ -1,5 +1,14 @@
--- a/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
+++ b/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
@@ -83,7 +83,7 @@
private int ticksSinceCrystalsScanned;
private int ticksSinceLastPlayerScan;
private boolean dragonKilled;
- private boolean previouslyKilled;
+ public boolean previouslyKilled;
private boolean skipArenaLoadedCheck;
@Nullable
public UUID dragonUUID;
@@ -110,14 +110,14 @@
this.origin = blockposition;
this.validPlayer = IEntitySelector.ENTITY_STILL_ALIVE.and(IEntitySelector.withinDistance((double) blockposition.getX(), (double) (128 + blockposition.getY()), (double) blockposition.getZ(), 192.0D));

View file

@ -62,6 +62,11 @@ public class CraftDragonBattle implements DragonBattle {
return handle.hasPreviouslyKilledDragon();
}
@Override
public void setPreviouslyKilled(boolean previouslyKilled) {
handle.previouslyKilled = previouslyKilled;
}
@Override
public void initiateRespawn() {
this.handle.tryRespawn();