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 9ed33e7ebb64ec74be2d2e38a35612786408adff..ed0d1d6285556f0949a7ea81ad692b663ec191a7 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
@@ -218,7 +218,7 @@ public class EndDragonFight {
             this.dragonUUID = enderDragon.getUUID();
             LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon);
             this.dragonKilled = false;
-            if (!bl) {
+            if (!bl && this.level.paperConfig().entities.behavior.shouldRemoveDragon) {
                 LOGGER.info("But we didn't have a portal, let's remove it.");
                 enderDragon.discard();
                 this.dragonUUID = null;
