summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-02-05 01:54:48 -0500
committerEvilSeph <evilseph@gmail.com>2012-02-05 02:11:21 -0500
commit4d563342ba36976964a28b1705dd2d3465a91b0f (patch)
treec578977bdf792648d395ac3388c6b366776dd997 /src/main/java/net/minecraft/server
parent54e45b7d663914411e44c17085fc579d3b2ea970 (diff)
downloadcraftbukkit-4d563342ba36976964a28b1705dd2d3465a91b0f.tar
craftbukkit-4d563342ba36976964a28b1705dd2d3465a91b0f.tar.gz
craftbukkit-4d563342ba36976964a28b1705dd2d3465a91b0f.tar.lz
craftbukkit-4d563342ba36976964a28b1705dd2d3465a91b0f.tar.xz
craftbukkit-4d563342ba36976964a28b1705dd2d3465a91b0f.zip
Added Spawner Egg support to CreatureSpawnEvent.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-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;