Paper/paper-server/nms-patches/net/minecraft/world/level/block/BlockMonsterEggs.patch
CraftBukkit/Spigot 8b26bb8f3e Update to Minecraft 1.19.3
By: md_5 <git@md-5.net>
2022-12-08 03:00:00 +11:00

21 lines
889 B
Diff

--- a/net/minecraft/world/level/block/BlockMonsterEggs.java
+++ b/net/minecraft/world/level/block/BlockMonsterEggs.java
@@ -16,6 +16,8 @@
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;
@@ -42,7 +44,7 @@
if (entitysilverfish != null) {
entitysilverfish.moveTo((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
- worldserver.addFreshEntity(entitysilverfish);
+ worldserver.addFreshEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
entitysilverfish.spawnAnim();
}