From c8ba4fb7892e4596781b4fe406233aa01c0ac31b Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Wed, 30 Sep 2020 22:49:14 +0200 Subject: [PATCH] Toggle for removing existing dragon --- .../world/level/dimension/end/EndDragonFight.java.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch index c3d6a8c90f..ba2646cb22 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch @@ -23,9 +23,12 @@ this.gateways.addAll((Collection) data.gateways.orElseGet(() -> { ObjectArrayList objectarraylist = new ObjectArrayList(ContiguousSet.create(Range.closedOpen(0, 20), DiscreteDomain.integers())); -@@ -208,7 +214,7 @@ +@@ -206,9 +212,9 @@ + this.dragonUUID = entityenderdragon.getUUID(); + EndDragonFight.LOGGER.info("Found that there's a dragon still alive ({})", entityenderdragon); this.dragonKilled = false; - if (!flag) { +- 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(); + entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause