Paper/patches/unapplied/server/0214-Add-config-to-disable-ender-dragon-legacy-check.patch
2023-09-21 19:18:04 +02:00

22 Zeilen
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 22 Jun 2018 10:38:31 -0500
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 c1c89d93f437850f6126ca69664dc9a3c5feac96..43a82ed953dd5d19f1c1c55b011b0cedef5ad7a2 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;
+ // Paper start
+ this.needsStateScanning = world.paperConfig().entities.spawning.scanForLegacyEnderDragon;
+ if (!this.needsStateScanning) this.dragonKilled = true;
+ // Paper end
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));