mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Allow disabling mob spawner spawn egg transformation
This commit is contained in:
parent
38ea31d1cb
commit
870ed90a9a
@ -1,6 +1,15 @@
|
||||
--- a/net/minecraft/world/item/SpawnEggItem.java
|
||||
+++ b/net/minecraft/world/item/SpawnEggItem.java
|
||||
@@ -176,10 +176,10 @@
|
||||
@@ -63,6 +63,8 @@
|
||||
EntityType entitytypes;
|
||||
|
||||
if (tileentity instanceof Spawner) {
|
||||
+ if (world.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) return InteractionResult.FAIL; // Paper - Allow disabling mob spawner spawn egg transformation
|
||||
+
|
||||
Spawner spawner = (Spawner) tileentity;
|
||||
|
||||
entitytypes = this.getType(world.registryAccess(), itemstack);
|
||||
@@ -176,10 +178,10 @@
|
||||
return Optional.empty();
|
||||
} else {
|
||||
((Mob) object).moveTo(pos.x(), pos.y(), pos.z(), 0.0F, 0.0F);
|
||||
|
Loading…
Reference in New Issue
Block a user