Search in sources :

Example 6 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project Bookshelf by Darkhax-Minecraft.

the class TileEntityBasicChest method getUpdatePacket.

@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    final NBTTagCompound nbt = new NBTTagCompound();
    nbt.setString("builder", this.builder.getModid());
    nbt.setString("type", this.type == null ? this.typeString : this.type.getName());
    return new SPacketUpdateTileEntity(this.pos, this.getBlockMetadata(), nbt);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity)

Example 7 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project SecurityCraft by Geforce132.

the class TileEntitySCTE method getUpdatePacket.

@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    NBTTagCompound tag = new NBTTagCompound();
    this.writeToNBT(tag);
    return new SPacketUpdateTileEntity(pos, 1, tag);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity)

Example 8 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project Overloaded by CJ-MC-Mods.

the class TilePlayerInterface method getUpdatePacket.

@Nullable
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);
    return new SPacketUpdateTileEntity(getPos(), 1, tag);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity) Nullable(javax.annotation.Nullable)

Example 9 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project NetherEx by LogicTechCorp.

the class TileEntityInventory method getUpdatePacket.

@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    NBTTagCompound compound = new NBTTagCompound();
    writeToNBT(compound);
    return new SPacketUpdateTileEntity(pos, 0, compound);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity)

Example 10 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project minecolonies by Minecolonies.

the class ScarecrowTileEntity method getUpdatePacket.

///////////---- Following methods are used to update the tileEntity between client and server ----///////////
@NotNull
@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    @NotNull final NBTTagCompound tag = new NBTTagCompound();
    writeToNBT(tag);
    return new SPacketUpdateTileEntity(this.getPos(), 0, tag);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) NotNull(org.jetbrains.annotations.NotNull) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

SPacketUpdateTileEntity (net.minecraft.network.play.server.SPacketUpdateTileEntity)17 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)16 Nullable (javax.annotation.Nullable)3 WorldServer (net.minecraft.world.WorldServer)1 NotNull (org.jetbrains.annotations.NotNull)1