aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0206-Add-config-to-disable-ender-dragon-legacy-check.patch
blob: 8a9728d94f1f5c24c0817a624b16d88ad4b4e510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 38c2aed0785b3b5bcceba572a1a6f5fb0224964d..cad7a1b28c9d7a3e67dbf0865cbf232ebd39a8d9 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 - Add config to disable ender dragon legacy check
+        this.needsStateScanning = world.paperConfig().entities.spawning.scanForLegacyEnderDragon;
+        if (!this.needsStateScanning) 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));