world.spawnCreature cast fix

This commit is contained in:
Erik Broes 2011-03-30 00:40:46 +02:00
parent c69eac3f3a
commit e9cc4bbb05

View File

@ -347,7 +347,7 @@ public class CraftWorld implements World {
try { try {
EntityLiving entityCreature = (EntityLiving) EntityTypes.a(creatureType.getName(), world); EntityLiving entityCreature = (EntityLiving) EntityTypes.a(creatureType.getName(), world);
entityCreature.a(loc.getX(), loc.getY(), loc.getZ()); entityCreature.a(loc.getX(), loc.getY(), loc.getZ());
creature = (Creature) CraftEntity.getEntity(server, entityCreature); creature = (LivingEntity) CraftEntity.getEntity(server, entityCreature);
world.a(entityCreature); world.a(entityCreature);
} catch (Exception e) { } catch (Exception e) {
// if we fail, for any reason, return null. // if we fail, for any reason, return null.