Search in sources :

Example 11 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 12 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)

Example 13 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project ImmersiveEngineering by BluSunrize.

the class TileEntityImmersiveConnectable method getUpdatePacket.

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

Example 14 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project ImmersiveEngineering by BluSunrize.

the class TileEntityIEBase method getUpdatePacket.

@Override
public SPacketUpdateTileEntity getUpdatePacket() {
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    this.writeCustomNBT(nbttagcompound, true);
    return new SPacketUpdateTileEntity(this.pos, 3, nbttagcompound);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SPacketUpdateTileEntity(net.minecraft.network.play.server.SPacketUpdateTileEntity)

Example 15 with SPacketUpdateTileEntity

use of net.minecraft.network.play.server.SPacketUpdateTileEntity in project ConvenientAdditions by Necr0.

the class TileEntityComposter method getUpdatePacket.

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

Aggregations

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