#1337: Add DragonBattle#setPreviouslyKilled

This commit is contained in:
DaFeist 2024-01-17 18:23:36 +11:00 committed by md_5
parent c8b4da803d
commit c9c24535ef
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,14 @@
--- a/net/minecraft/world/level/dimension/end/EnderDragonBattle.java --- a/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
+++ b/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 @@ @@ -110,14 +110,14 @@
this.origin = blockposition; this.origin = blockposition;
this.validPlayer = IEntitySelector.ENTITY_STILL_ALIVE.and(IEntitySelector.withinDistance((double) blockposition.getX(), (double) (128 + blockposition.getY()), (double) blockposition.getZ(), 192.0D)); 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(); return handle.hasPreviouslyKilledDragon();
} }
@Override
public void setPreviouslyKilled(boolean previouslyKilled) {
handle.previouslyKilled = previouslyKilled;
}
@Override @Override
public void initiateRespawn() { public void initiateRespawn() {
this.handle.tryRespawn(); this.handle.tryRespawn();