73 lines
3.5 KiB
Diff

--- 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));
this.needsStateScanning = enderdragonbattle_a.needsStateScanning;
- this.dragonUUID = (UUID) enderdragonbattle_a.dragonUUID.orElse((Object) null);
+ this.dragonUUID = (UUID) enderdragonbattle_a.dragonUUID.orElse(null); // CraftBukkit - decompile error
this.dragonKilled = enderdragonbattle_a.dragonKilled;
this.previouslyKilled = enderdragonbattle_a.previouslyKilled;
if (enderdragonbattle_a.isRespawning) {
this.respawnStage = EnumDragonRespawn.START;
}
- this.portalLocation = (BlockPosition) enderdragonbattle_a.exitPortalLocation.orElse((Object) null);
+ this.portalLocation = (BlockPosition) enderdragonbattle_a.exitPortalLocation.orElse(null); // CraftBukkit - decompile error
this.gateways.addAll((Collection) enderdragonbattle_a.gateways.orElseGet(() -> {
ObjectArrayList<Integer> objectarraylist = new ObjectArrayList(ContiguousSet.create(Range.closedOpen(0, 20), DiscreteDomain.integers()));
@@ -510,7 +510,7 @@
return this.previouslyKilled;
}
- public void tryRespawn() {
+ public boolean tryRespawn() { // CraftBukkit - return boolean
if (this.dragonKilled && this.respawnStage == null) {
BlockPosition blockposition = this.portalLocation;
@@ -537,19 +537,19 @@
List<EntityEnderCrystal> list1 = this.level.getEntitiesOfClass(EntityEnderCrystal.class, new AxisAlignedBB(blockposition1.relative(enumdirection, 2)));
if (list1.isEmpty()) {
- return;
+ return false; // CraftBukkit - return value
}
list.addAll(list1);
}
EnderDragonBattle.LOGGER.debug("Found all crystals, respawning dragon.");
- this.respawnDragon(list);
+ return this.respawnDragon(list); // CraftBukkit - return value
}
-
+ return false; // CraftBukkit - return value
}
- public void respawnDragon(List<EntityEnderCrystal> list) {
+ public boolean respawnDragon(List<EntityEnderCrystal> list) { // CraftBukkit - return boolean
if (this.dragonKilled && this.respawnStage == null) {
for (ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = this.findExitPortal(); shapedetector_shapedetectorcollection != null; shapedetector_shapedetectorcollection = this.findExitPortal()) {
for (int i = 0; i < this.exitPortalPattern.getWidth(); ++i) {
@@ -569,8 +569,9 @@
this.respawnTime = 0;
this.spawnExitPortal(false);
this.respawnCrystals = list;
+ return true; // CraftBukkit - return value
}
-
+ return false; // CraftBukkit - return value
}
public void resetSpikeCrystals() {