Added SpawnReasons to CreatureSpawn events. Thanks winsock!

This commit is contained in:
EvilSeph committed 2011-06-21 16:37:07 -04:00
1 parent faab690dc7
commit 79337d3aab
7 files changed
+279 -9

No files matched your search

@@ -2,8 +2,7 @@ package net.minecraft.server;
// CraftBukkit start
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.PigZapEvent;
// CraftBukkit end
@@ -83,7 +82,8 @@ public class EntityPig extends EntityAnimal {
// CraftBukkit end
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
this.world.addEntity(entitypigzombie);
// CraftBukkit - added a reason for spawning this creature
this.world.addEntity(entitypigzombie, SpawnReason.LIGHTNING);
this.die();
}
}