use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project Railcraft by Railcraft.
the class PacketBuilder method sendTileEntityPacket.
public void sendTileEntityPacket(TileEntity tile) {
if (tile.getWorld() instanceof WorldServer) {
WorldServer world = (WorldServer) tile.getWorld();
SPacketUpdateTileEntity packet = tile.getUpdatePacket();
if (packet != null)
PacketDispatcher.sendToWatchers(packet, world, tile.getPos().getX(), tile.getPos().getZ());
}
}
use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project Witchworks by Um-Mitternacht.
the class TileMod method getUpdatePacket.
@Override
public final SPacketUpdateTileEntity getUpdatePacket() {
final NBTTagCompound tag = getUpdateTag();
writeDataNBT(tag);
return new SPacketUpdateTileEntity(pos, 0, tag);
}
use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project SecurityCraft by Geforce132.
the class TileEntityKeypadChest method getUpdatePacket.
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new SPacketUpdateTileEntity(pos, 1, tag);
}
use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project SecurityCraft by Geforce132.
the class TileEntityOwnable method getUpdatePacket.
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new SPacketUpdateTileEntity(pos, 1, tag);
}
use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project MorePlanets by SteveKunG.
the class TileEntityVeinPortal method getUpdatePacket.
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setLong("Age", this.age);
nbt.setBoolean("Middle", this.isMiddle);
nbt.setBoolean("SpawnedBoss", this.spawnedBoss);
nbt.setInteger("DelayToTeleport", this.delayToTeleport);
return new SPacketUpdateTileEntity(this.pos, -1, nbt);
}
Aggregations