mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 06:56:14 +00:00
73 lines
3.5 KiB
Diff
73 lines
3.5 KiB
Diff
--- a/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
|
|
+++ b/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
|
|
@@ -111,14 +111,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()));
|
|
|
|
@@ -208,7 +208,7 @@
|
|
this.dragonKilled = false;
|
|
if (!flag) {
|
|
EnderDragonBattle.LOGGER.info("But we didn't have a portal, let's remove it.");
|
|
- entityenderdragon.discard();
|
|
+ entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause
|
|
this.dragonUUID = null;
|
|
}
|
|
}
|
|
@@ -513,7 +513,7 @@
|
|
return this.previouslyKilled;
|
|
}
|
|
|
|
- public void tryRespawn() {
|
|
+ public boolean tryRespawn() { // CraftBukkit - return boolean
|
|
if (this.dragonKilled && this.respawnStage == null) {
|
|
BlockPosition blockposition = this.portalLocation;
|
|
|
|
@@ -540,19 +540,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) {
|
|
@@ -572,8 +572,9 @@
|
|
this.respawnTime = 0;
|
|
this.spawnExitPortal(false);
|
|
this.respawnCrystals = list;
|
|
+ return true; // CraftBukkit - return value
|
|
}
|
|
-
|
|
+ return false; // CraftBukkit - return value
|
|
}
|
|
|
|
public void resetSpikeCrystals() {
|