summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/ItemMonsterEgg.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemMonsterEgg.java')
-rw-r--r--src/main/java/net/minecraft/server/ItemMonsterEgg.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
index 58bf9b7b..a15d9e61 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;