aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0428-Toggle-for-removing-existing-dragon.patch
blob: 23aadb86ee11aad07bbc0511f49aa5e35724c857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
Date: Wed, 30 Sep 2020 22:49:14 +0200
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 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
@@ -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;
-            if (!flag) {
+            if (!flag && this.level.paperConfig().entities.behavior.shouldRemoveDragon) { // Paper - Toggle for removing existing dragon
                 EndDragonFight.LOGGER.info("But we didn't have a portal, let's remove it.");
                 entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause
                 this.dragonUUID = null;