From 58c9443d767db18e4b33d7501e79bd83f2b758f3 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Wed, 30 Sep 2020 22:52:29 +0200 Subject: [PATCH] Toggle for removing existing dragon --- .../Toggle-for-removing-existing-dragon.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Spigot-Server-Patches/Toggle-for-removing-existing-dragon.patch diff --git a/Spigot-Server-Patches/Toggle-for-removing-existing-dragon.patch b/Spigot-Server-Patches/Toggle-for-removing-existing-dragon.patch new file mode 100644 index 0000000000..63669d312f --- /dev/null +++ b/Spigot-Server-Patches/Toggle-for-removing-existing-dragon.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 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 + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -0,0 +0,0 @@ public class PaperWorldConfig { + log("Using vanilla redstone algorithm."); + } + } ++ ++ public boolean shouldRemoveDragon = false; ++ private void shouldRemoveDragon() { ++ shouldRemoveDragon = getBoolean("should-remove-dragon", shouldRemoveDragon); ++ if (shouldRemoveDragon) { ++ log("The Ender Dragon will be removed if she already exists without a portal."); ++ } ++ } + } +diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java ++++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java +@@ -0,0 +0,0 @@ public class EnderDragonBattle { + this.dragonUUID = entityenderdragon.getUniqueID(); + EnderDragonBattle.LOGGER.info("Found that there's a dragon still alive ({})", entityenderdragon); + this.dragonKilled = false; +- if (!flag) { ++ if (!flag && this.world.paperConfig.shouldRemoveDragon) { // Paper + EnderDragonBattle.LOGGER.info("But we didn't have a portal, let's remove it."); + entityenderdragon.die(); + this.dragonUUID = null;