Archiviert
13
0

Changed resolution order in CraftWorld.toCraftEntity() to give CraftMappable precedence.

Dieser Commit ist enthalten in:
sk89q 2011-01-07 14:06:08 -08:00
Ursprung 6d6668aaeb
Commit e968096fc7

Datei anzeigen

@ -166,7 +166,9 @@ public class CraftWorld implements World {
} }
public CraftEntity toCraftEntity(net.minecraft.server.Entity entity) { public CraftEntity toCraftEntity(net.minecraft.server.Entity entity) {
if (entity instanceof EntityArrow) { if (entity instanceof CraftMappable) {
return ((CraftMappable)entity).getCraftEntity();
} else if (entity instanceof EntityArrow) {
return new CraftArrow(world.getServer(), (EntityArrow)entity); return new CraftArrow(world.getServer(), (EntityArrow)entity);
} else if (entity instanceof EntityEgg) { } else if (entity instanceof EntityEgg) {
return new CraftEgg(world.getServer(), (EntityEgg)entity); return new CraftEgg(world.getServer(), (EntityEgg)entity);
@ -178,8 +180,6 @@ public class CraftWorld implements World {
return new CraftHumanEntity(world.getServer(), (EntityPlayer)entity); return new CraftHumanEntity(world.getServer(), (EntityPlayer)entity);
} else if (entity instanceof EntityLiving) { } else if (entity instanceof EntityLiving) {
return new CraftLivingEntity(world.getServer(), (EntityLiving)entity); return new CraftLivingEntity(world.getServer(), (EntityLiving)entity);
} else if (entity instanceof CraftMappable) {
return ((CraftMappable)entity).getCraftEntity();
} else { } else {
return null; return null;
} }