diff options
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0628-Allow-disabling-mob-spawner-spawn-egg-transformation.patch')
-rw-r--r-- | Spigot-Server-Patches-Unmapped/0628-Allow-disabling-mob-spawner-spawn-egg-transformation.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0628-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/Spigot-Server-Patches-Unmapped/0628-Allow-disabling-mob-spawner-spawn-egg-transformation.patch new file mode 100644 index 0000000000..5a7b73fbca --- /dev/null +++ b/Spigot-Server-Patches-Unmapped/0628-Allow-disabling-mob-spawner-spawn-egg-transformation.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BrodyBeckwith <[email protected]> +Date: Fri, 9 Oct 2020 20:30:12 -0400 +Subject: [PATCH] Allow disabling mob spawner spawn egg transformation + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 9ebe8771c2d5e843756868824740ef599ca8455f..a555d040fdc58f7c89ef78e3e6851916fdd8462a 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -720,4 +720,9 @@ public class PaperWorldConfig { + private void fixCuringExploit() { + fixCuringZombieVillagerDiscountExploit = getBoolean("game-mechanics.fix-curing-zombie-villager-discount-exploit", fixCuringZombieVillagerDiscountExploit); + } ++ ++ public boolean disableMobSpawnerSpawnEggTransformation = false; ++ private void disableMobSpawnerSpawnEggTransformation() { ++ disableMobSpawnerSpawnEggTransformation = getBoolean("game-mechanics.disable-mob-spawner-spawn-egg-transformation", disableMobSpawnerSpawnEggTransformation); ++ } + } +diff --git a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java +index c170d2141504d80624e3c1a7f78f7968ea8a80ee..4d965e504a40eb52777575df839856c825a0900a 100644 +--- a/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java ++++ b/src/main/java/net/minecraft/world/item/ItemMonsterEgg.java +@@ -60,7 +60,7 @@ public class ItemMonsterEgg extends Item { + EnumDirection enumdirection = itemactioncontext.getClickedFace(); + IBlockData iblockdata = world.getType(blockposition); + +- if (iblockdata.a(Blocks.SPAWNER)) { ++ if (!world.paperConfig.disableMobSpawnerSpawnEggTransformation && iblockdata.a(Blocks.SPAWNER)) { // Paper + TileEntity tileentity = world.getTileEntity(blockposition); + + if (tileentity instanceof TileEntityMobSpawner) { |