aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-08-16 21:45:07 +0200
committerGitHub <[email protected]>2024-08-16 21:45:07 +0200
commit95719832bf57ae523982d681cd219e8387c39955 (patch)
tree26aaaedcadad46d3c192e2be1315ef4de5e220e0
parent81bfda87103e1a47ea184c5da119e79218a8dc1e (diff)
downloadPaper-95719832bf57ae523982d681cd219e8387c39955.tar.gz
Paper-95719832bf57ae523982d681cd219e8387c39955.zip
Fix scanForLegacyEnderDragon world config (#11262)
-rw-r--r--patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch22
-rw-r--r--patches/server/0418-Reset-Ender-Crystals-on-Dragon-Spawn.patch4
-rw-r--r--patches/server/0428-Toggle-for-removing-existing-dragon.patch4
-rw-r--r--patches/server/0482-Add-toggle-for-always-placing-the-dragon-egg.patch4
-rw-r--r--patches/server/0486-Add-DragonEggFormEvent.patch4
-rw-r--r--patches/server/0618-Prevent-softlocked-end-exit-portal-generation.patch4
-rw-r--r--patches/server/0767-ensure-reset-EnderDragon-boss-event-name.patch4
-rw-r--r--patches/server/0872-More-DragonBattle-API.patch4
-rw-r--r--patches/server/0881-Do-crystal-portal-proximity-check-before-entity-look.patch6
9 files changed, 29 insertions, 27 deletions
diff --git a/patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch
index c9acef0191..0d69ebd2b4 100644
--- a/patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch
+++ b/patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch
@@ -5,17 +5,19 @@ Subject: [PATCH] Add config to disable ender dragon legacy check
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 1a56247191172622f2bde6d799bc44f70b9ce3ae..6f9c78b124a33212125e98905efc8a09a1891500 100644
+index 1a56247191172622f2bde6d799bc44f70b9ce3ae..93337fd026fefb76c8a288674fed05cb3c1eca38 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -106,6 +106,10 @@ public class EndDragonFight {
- this.ticksSinceLastPlayerScan = 21;
- this.skipArenaLoadedCheck = false;
- this.needsStateScanning = true;
+@@ -116,6 +116,12 @@ public class EndDragonFight {
+ if (data.isRespawning) {
+ this.respawnStage = DragonRespawnAnimation.START;
+ }
+ // Paper start - Add config to disable ender dragon legacy check
-+ this.needsStateScanning = world.paperConfig().entities.spawning.scanForLegacyEnderDragon;
-+ if (!this.needsStateScanning) this.dragonKilled = true;
++ if (data == EndDragonFight.Data.DEFAULT && !world.paperConfig().entities.spawning.scanForLegacyEnderDragon) {
++ this.needsStateScanning = false;
++ this.dragonKilled = true;
++ }
+ // Paper end - Add config to disable ender dragon legacy check
- this.level = world;
- this.origin = origin;
- this.validPlayer = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance((double) origin.getX(), (double) (128 + origin.getY()), (double) origin.getZ(), 192.0D));
+
+ this.portalLocation = (BlockPos) data.exitPortalLocation.orElse(null); // CraftBukkit - decompile error
+ this.gateways.addAll((Collection) data.gateways.orElseGet(() -> {
diff --git a/patches/server/0418-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0418-Reset-Ender-Crystals-on-Dragon-Spawn.patch
index f727c2200f..c9cb9f1660 100644
--- a/patches/server/0418-Reset-Ender-Crystals-on-Dragon-Spawn.patch
+++ b/patches/server/0418-Reset-Ender-Crystals-on-Dragon-Spawn.patch
@@ -11,10 +11,10 @@ This ensures the crystals/pillars are in expected state when the dragon spawns.
See #3522
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 6f9c78b124a33212125e98905efc8a09a1891500..79b63082e849f29244352b9d0d6ac9b7df7813f6 100644
+index 3aa4301521ea8155287ce97a9bb69fe20d9a54b7..f90d637e5477275b870c1a1963774de04aaa218d 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -472,6 +472,7 @@ public class EndDragonFight {
+@@ -474,6 +474,7 @@ public class EndDragonFight {
entityenderdragon.moveTo((double) this.origin.getX(), (double) (128 + this.origin.getY()), (double) this.origin.getZ(), this.level.random.nextFloat() * 360.0F, 0.0F);
this.level.addFreshEntity(entityenderdragon);
this.dragonUUID = entityenderdragon.getUUID();
diff --git a/patches/server/0428-Toggle-for-removing-existing-dragon.patch b/patches/server/0428-Toggle-for-removing-existing-dragon.patch
index 1bfa511969..23aadb86ee 100644
--- a/patches/server/0428-Toggle-for-removing-existing-dragon.patch
+++ b/patches/server/0428-Toggle-for-removing-existing-dragon.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for removing existing dragon
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 79b63082e849f29244352b9d0d6ac9b7df7813f6..3ea0ca395e0561d96044f0f84442a08b42b539bd 100644
+index f90d637e5477275b870c1a1963774de04aaa218d..943d9f84ad839562a4e30fff1257a1224d0b70b6 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -209,7 +209,7 @@ public class EndDragonFight {
+@@ -211,7 +211,7 @@ public class EndDragonFight {
this.dragonUUID = entityenderdragon.getUUID();
EndDragonFight.LOGGER.info("Found that there's a dragon still alive ({})", entityenderdragon);
this.dragonKilled = false;
diff --git a/patches/server/0482-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0482-Add-toggle-for-always-placing-the-dragon-egg.patch
index 2576990e24..39031695e8 100644
--- a/patches/server/0482-Add-toggle-for-always-placing-the-dragon-egg.patch
+++ b/patches/server/0482-Add-toggle-for-always-placing-the-dragon-egg.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add toggle for always placing the dragon egg
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 3ea0ca395e0561d96044f0f84442a08b42b539bd..f81dab25fedeed08f4d3ba2d7435e2da526e6056 100644
+index 943d9f84ad839562a4e30fff1257a1224d0b70b6..412838a4eb3d29da5955bf1c279f66a2e7ccad12 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -407,7 +407,7 @@ public class EndDragonFight {
+@@ -409,7 +409,7 @@ public class EndDragonFight {
this.dragonEvent.setVisible(false);
this.spawnExitPortal(true);
this.spawnNewGateway();
diff --git a/patches/server/0486-Add-DragonEggFormEvent.patch b/patches/server/0486-Add-DragonEggFormEvent.patch
index c9ec752038..1277e3504a 100644
--- a/patches/server/0486-Add-DragonEggFormEvent.patch
+++ b/patches/server/0486-Add-DragonEggFormEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add DragonEggFormEvent
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index f81dab25fedeed08f4d3ba2d7435e2da526e6056..609b20e2b222c5b1fddf22c2621d0d7a88cabcfa 100644
+index 412838a4eb3d29da5955bf1c279f66a2e7ccad12..0455c5fd2bb7955a0f343468b4bea760d6d35310 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -407,8 +407,22 @@ public class EndDragonFight {
+@@ -409,8 +409,22 @@ public class EndDragonFight {
this.dragonEvent.setVisible(false);
this.spawnExitPortal(true);
this.spawnNewGateway();
diff --git a/patches/server/0618-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0618-Prevent-softlocked-end-exit-portal-generation.patch
index e2698e961b..ddf9bf2d23 100644
--- a/patches/server/0618-Prevent-softlocked-end-exit-portal-generation.patch
+++ b/patches/server/0618-Prevent-softlocked-end-exit-portal-generation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent softlocked end exit portal generation
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 609b20e2b222c5b1fddf22c2621d0d7a88cabcfa..b8bba857aa390e5435b8a199a25065a940d6a972 100644
+index 0455c5fd2bb7955a0f343468b4bea760d6d35310..e5927f378789e1d8b83ca5c84d657e0e637cc575 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -466,6 +466,11 @@ public class EndDragonFight {
+@@ -468,6 +468,11 @@ public class EndDragonFight {
}
}
diff --git a/patches/server/0767-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0767-ensure-reset-EnderDragon-boss-event-name.patch
index 854c391fc5..47272d2095 100644
--- a/patches/server/0767-ensure-reset-EnderDragon-boss-event-name.patch
+++ b/patches/server/0767-ensure-reset-EnderDragon-boss-event-name.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] ensure reset EnderDragon boss event name
Fix MC-257487
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index b8bba857aa390e5435b8a199a25065a940d6a972..f6f5fad52e41d5ccc37dc28c40904fce014907fb 100644
+index e5927f378789e1d8b83ca5c84d657e0e637cc575..0100d3f4cb2c1d3e2e052ee109aea707029d0c10 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -73,6 +73,7 @@ public class EndDragonFight {
@@ -26,7 +26,7 @@ index b8bba857aa390e5435b8a199a25065a940d6a972..f6f5fad52e41d5ccc37dc28c40904fce
this.gateways = new ObjectArrayList();
this.ticksSinceLastPlayerScan = 21;
this.skipArenaLoadedCheck = false;
-@@ -503,6 +504,10 @@ public class EndDragonFight {
+@@ -505,6 +506,10 @@ public class EndDragonFight {
this.ticksSinceDragonSeen = 0;
if (dragon.hasCustomName()) {
this.dragonEvent.setName(dragon.getDisplayName());
diff --git a/patches/server/0872-More-DragonBattle-API.patch b/patches/server/0872-More-DragonBattle-API.patch
index a6e0c111c0..f505ebe14d 100644
--- a/patches/server/0872-More-DragonBattle-API.patch
+++ b/patches/server/0872-More-DragonBattle-API.patch
@@ -10,10 +10,10 @@ public net.minecraft.world.level.dimension.end.EndDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index f6f5fad52e41d5ccc37dc28c40904fce014907fb..6b59c4b5906c0fb4fdbc674452c6ff3df42b099b 100644
+index 0100d3f4cb2c1d3e2e052ee109aea707029d0c10..10683807a273be95a40794a7b562a15fc5dec2cc 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -439,6 +439,24 @@ public class EndDragonFight {
+@@ -441,6 +441,24 @@ public class EndDragonFight {
this.gateways.clear();
}
diff --git a/patches/server/0881-Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/0881-Do-crystal-portal-proximity-check-before-entity-look.patch
index 67d506a715..b64a33079d 100644
--- a/patches/server/0881-Do-crystal-portal-proximity-check-before-entity-look.patch
+++ b/patches/server/0881-Do-crystal-portal-proximity-check-before-entity-look.patch
@@ -34,10 +34,10 @@ index 273bb38f14b8af08d123e02742d365fb5d91cdf5..5f51e64cb0611a4ba6bdcdcacbcba106
}
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 6b59c4b5906c0fb4fdbc674452c6ff3df42b099b..18a1b4325cac81b040596071dab99ef9bf6f3142 100644
+index 10683807a273be95a40794a7b562a15fc5dec2cc..aa7e8cdcc1979397fc60a8517f2f504bce84f19f 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-@@ -558,6 +558,12 @@ public class EndDragonFight {
+@@ -560,6 +560,12 @@ public class EndDragonFight {
}
public boolean tryRespawn() { // CraftBukkit - return boolean
@@ -50,7 +50,7 @@ index 6b59c4b5906c0fb4fdbc674452c6ff3df42b099b..18a1b4325cac81b040596071dab99ef9
if (this.dragonKilled && this.respawnStage == null) {
BlockPos blockposition = this.portalLocation;
-@@ -575,6 +581,22 @@ public class EndDragonFight {
+@@ -577,6 +583,22 @@ public class EndDragonFight {
blockposition = this.portalLocation;
}