diff --git a/Spigot-Server-Patches/0662-Add-toggle-for-always-placing-the-dragon-egg.patch b/Spigot-Server-Patches/0662-Add-toggle-for-always-placing-the-dragon-egg.patch new file mode 100644 index 000000000..ee3eca723 --- /dev/null +++ b/Spigot-Server-Patches/0662-Add-toggle-for-always-placing-the-dragon-egg.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Thu, 26 Nov 2020 11:47:24 +0000 +Subject: [PATCH] Add toggle for always placing the dragon egg + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 4735dcba31b556fafe9c7d7440c89e940755c81f..ac96011d4e104c99bb37833d91b8121f03b9d349 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -794,4 +794,9 @@ public class PaperWorldConfig { + if (value != -1) entityPerChunkSaveLimits.put(type, value); + }); + } ++ ++ public boolean enderDragonsDeathAlwaysPlacesDragonEgg = false; ++ private void enderDragonsDeathAlwaysPlacesDragonEgg() { ++ enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg); ++ } + } +diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java +index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..7f11adbc5d8527b50f7657d46459516a471017b3 100644 +--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java ++++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java +@@ -358,7 +358,7 @@ public class EnderDragonBattle { + this.bossBattle.setVisible(false); + this.generateExitPortal(true); + this.n(); +- if (!this.previouslyKilled) { ++ if (this.world.paperConfig.enderDragonsDeathAlwaysPlacesDragonEgg || !this.previouslyKilled) { // Paper - always place dragon egg + this.world.setTypeUpdate(this.world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, WorldGenEndTrophy.a), Blocks.DRAGON_EGG.getBlockData()); + } +