use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class RailMonoMagnetReception method spawnCart.
public void spawnCart(World world, int x, int y, int z) {
TileEntityRail rail = null;
if (world.getTileEntity(x, y, z) instanceof TileEntityRail) {
rail = (TileEntityRail) world.getTileEntity(x, y, z);
}
if (rail != null) {
if (rail.cartType.isEmpty())
return;
if (rail.cartType.equals("loco"))
return;
if (rail.cartType.equals(NSPCT4.class.getName())) {
MinecartBase cart = new NSPCT4(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
world.spawnEntityInWorld(cart);
} else if (rail.cartType.equals(NSPCT5.class.getName())) {
MinecartBase cart = new NSPCT5(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
world.spawnEntityInWorld(cart);
} else if (rail.cartType.equals(NSPCT6W.class.getName())) {
NSPCT6W.doSpawn(world, x, y, z, "");
} else if (rail.cartType.equals(NSPCT8W.class.getName())) {
NSPCT8W.doSpawn(world, x, y, z, "");
} else if (rail.cartType.equals(NSPCT9.class.getName())) {
NSPCT9 cart = new NSPCT9(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
cart.setExtendedInfo(rail.extInfo);
world.spawnEntityInWorld(cart);
}
}
}
use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class RailMonoMagnetReceptionAnti method spawnCart.
public void spawnCart(World world, int x, int y, int z) {
TileEntityRail rail = null;
if (world.getTileEntity(x, y, z) instanceof TileEntityRail) {
rail = (TileEntityRail) world.getTileEntity(x, y, z);
}
if (rail != null) {
if (rail.cartType.isEmpty())
return;
if (rail.cartType.equals("loco"))
return;
if (rail.cartType.equals(NSPCT4.class.getName())) {
MinecartBase cart = new NSPCT4(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
world.spawnEntityInWorld(cart);
} else if (rail.cartType.equals(NSPCT5.class.getName())) {
MinecartBase cart = new NSPCT5(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
world.spawnEntityInWorld(cart);
} else if (rail.cartType.equals(NSPCT6W.class.getName())) {
NSPCT6W.doSpawn(world, x, y, z, "");
} else if (rail.cartType.equals(NSPCT8W.class.getName())) {
NSPCT8W.doSpawn(world, x, y, z, "");
} else if (rail.cartType.equals(NSPCT9.class.getName())) {
NSPCT9 cart = new NSPCT9(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
cart.setExtendedInfo(rail.extInfo);
world.spawnEntityInWorld(cart);
}
}
}
Aggregations