From 42dae8d83eba7027b4d23c688b88c2daf66f1ae0 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:45:07 +0200 Subject: [PATCH] Fix scanForLegacyEnderDragon world config (#11262) --- ...-to-disable-ender-dragon-legacy-check.patch | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch index 86e1aa9683..b7088970b2 100644 --- a/patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/patches/server/Add-config-to-disable-ender-dragon-legacy-check.patch @@ -9,13 +9,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java @@ -0,0 +0,0 @@ public class EndDragonFight { - this.ticksSinceLastPlayerScan = 21; - this.skipArenaLoadedCheck = false; - this.needsStateScanning = true; + 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(() -> {