mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
33 lines
2 KiB
Diff
33 lines
2 KiB
Diff
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
|
|
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 {
|
|
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/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
|
@@ -0,0 +0,0 @@ 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) {
|