use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class NSPCT8C method doSpawn.
public static void doSpawn(World world, int x, int y, int z, String name) {
LocoBase head = new NSPCT8C(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
if (!name.isEmpty())
head.setMinecartName(name);
world.spawnEntityInWorld(head);
MinecartBase container = new NSPCT8C.Container(world, (double) x + 0.5, (double) y + 0.5 - 3.0, (double) z + 0.5);
world.spawnEntityInWorld(container);
container.mountEntity(head);
}
use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class ItemNSBT1 method onItemUse.
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float px, float py, float pz) {
if (BlockRailBase.func_150051_a(world.getBlock(x, y, z))) {
if (!world.isRemote) {
MinecartBase entityminecart = new NSBT1(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
if (itemStack.hasDisplayName()) {
entityminecart.setMinecartName(itemStack.getDisplayName());
}
world.spawnEntityInWorld(entityminecart);
}
--itemStack.stackSize;
return true;
} else {
return false;
}
}
use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class ItemNSPCT2 method onItemUse.
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float px, float py, float pz) {
if (BlockRailBase.func_150051_a(world.getBlock(x, y, z))) {
if (!world.isRemote) {
MinecartBase entityminecart = new NSPCT2(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
if (itemStack.hasDisplayName()) {
entityminecart.setMinecartName(itemStack.getDisplayName());
}
world.spawnEntityInWorld(entityminecart);
}
--itemStack.stackSize;
return true;
} else {
return false;
}
}
use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class ItemNSPCT5L method onItemUse.
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float px, float py, float pz) {
if (BlockRailBase.func_150051_a(world.getBlock(x, y, z))) {
if (!world.isRemote) {
MinecartBase entityminecart = new NSPCT5L(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
if (itemStack.hasDisplayName()) {
entityminecart.setMinecartName(itemStack.getDisplayName());
}
world.spawnEntityInWorld(entityminecart);
}
--itemStack.stackSize;
return true;
} else {
return false;
}
}
use of club.nsdn.nyasamarailway.entity.MinecartBase in project NyaSamaRailway by NSDN.
the class ItemNSPCT6 method onItemUse.
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float px, float py, float pz) {
if (BlockRailBase.func_150051_a(world.getBlock(x, y, z))) {
if (!world.isRemote) {
MinecartBase entityminecart = new NSPCT6(world, (double) x + 0.5, (double) y + 0.5, (double) z + 0.5);
if (itemStack.hasDisplayName()) {
entityminecart.setMinecartName(itemStack.getDisplayName());
}
world.spawnEntityInWorld(entityminecart);
}
--itemStack.stackSize;
return true;
} else {
return false;
}
}
Aggregations