From 4d563342ba36976964a28b1705dd2d3465a91b0f Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sun, 5 Feb 2012 01:54:48 -0500 Subject: [PATCH] Added Spawner Egg support to CreatureSpawnEvent. --- src/main/java/net/minecraft/server/ItemMonsterEgg.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java index 58bf9b7bee..a15d9e6167 100644 --- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java +++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java @@ -18,12 +18,13 @@ public class ItemMonsterEgg extends Item { Entity entity = EntityTypes.a(itemstack.getData(), world); if (entity != null && entity instanceof EntityLiving) { // CraftBukkit + if (!entityhuman.abilities.canInstantlyBuild) { --itemstack.count; } entity.setPositionRotation((double) i + 0.5D, (double) j, (double) k + 0.5D, 0.0F, 0.0F); - world.addEntity(entity); + world.addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit } return true;