2020-10-10 00:35:57 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BrodyBeckwith <brody@beckwith.dev>
|
|
|
|
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
|
2021-06-05 08:07:35 +00:00
|
|
|
index a3b3e3e04b7a5e3a351992e06870cc91fbd8adc8..b48067c71f9de18ba40e970e2832f6245984a218 100644
|
2020-10-10 00:35:57 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-05 08:07:35 +00:00
|
|
|
@@ -722,4 +722,9 @@ public class PaperWorldConfig {
|
2020-10-10 00:35:57 +00:00
|
|
|
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);
|
|
|
|
+ }
|
|
|
|
}
|
2021-03-16 07:19:45 +00:00
|
|
|
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 {
|
2020-10-10 00:35:57 +00:00
|
|
|
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) {
|