PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch

21 lines
946 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/level/block/BlockMonsterEggs.java
+++ b/net/minecraft/world/level/block/BlockMonsterEggs.java
@@ -18,6 +18,8 @@
2021-03-15 23:00:00 +01:00
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.block.state.properties.IBlockState;
+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit
+
public class BlockMonsterEggs extends Block {
private final Block hostBlock;
@@ -43,7 +45,7 @@
EntitySilverfish entitysilverfish = (EntitySilverfish) EntityTypes.SILVERFISH.a((World) worldserver);
entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
- worldserver.addEntity(entitysilverfish);
+ worldserver.addEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
entitysilverfish.doSpawnEffect();
}