removed all instances of new CraftEntity* where appropriate.

Entity.getBukkitEntity() is now used instead.
This commit is contained in:
Andrew Ardill
2011-01-23 23:23:13 +11:00
parent 9cd81ddd6d
commit a809e4e6e3
22 changed files with 275 additions and 145 deletions

View File

@@ -151,7 +151,7 @@ public class CraftWorld implements World {
CraftMinecart.Type.Minecart.getId()
);
world.a(minecart);
return new CraftMinecart(world.getServer(), minecart);
return (Minecart) minecart.getBukkitEntity();
}
public StorageMinecart spawnStorageMinecart(Location loc) {
@@ -163,7 +163,7 @@ public class CraftWorld implements World {
CraftMinecart.Type.StorageMinecart.getId()
);
world.a(minecart);
return new CraftStorageMinecart(world.getServer(), minecart);
return (StorageMinecart) minecart.getBukkitEntity();
}
public PoweredMinecart spawnPoweredMinecart(Location loc) {