summaryrefslogtreecommitdiffhomepage
path: root/patches/unapplied/server/0216-Add-config-to-disable-ender-dragon-legacy-check.patch
blob: b4b36f84c0db789301983e966c1976a102b3692f (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 8412fbcafcfacc907e5dbdfcbde3fdc8a067464d..fd57b5a4cf8906b7bfb7c8c4f57c7b057296c8a3 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
@@ -90,6 +90,10 @@ public class EndDragonFight {
     private List<EndCrystal> respawnCrystals;
 
     public EndDragonFight(ServerLevel world, long gatewaysSeed, CompoundTag nbt) {
+        // Paper start
+        this.needsStateScanning = world.paperConfig().entities.spawning.scanForLegacyEnderDragon;
+        if (!this.needsStateScanning) this.dragonKilled = true;
+        // Paper end
         this.level = world;
         if (nbt.contains("NeedsStateScanning")) {
             this.needsStateScanning = nbt.getBoolean("NeedsStateScanning");