net.minecraft.network.play.server.SUpdateTileEntityPacket Java Examples

The following examples show how to use net.minecraft.network.play.server.SUpdateTileEntityPacket. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RenderBlockTileEntity.java    From MiningGadgets with MIT License 4 votes vote down vote up
@Override
public SUpdateTileEntityPacket getUpdatePacket() {
    // Vanilla uses the type parameter to indicate which type of tile entity (command block, skull, or beacon?) is receiving the packet, but it seems like Forge has overridden this behavior
    return new SUpdateTileEntityPacket(pos, 0, getUpdateTag());
}
 
Example #2
Source File: RenderBlockTileEntity.java    From MiningGadgets with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) {
    read(pkt.getNbtCompound());
}
 
Example #3
Source File: TileFrequencyOwner.java    From EnderStorage with MIT License 4 votes vote down vote up
@Override
public final SUpdateTileEntityPacket getUpdatePacket() {
    return createPacket().toTilePacket(getPos());
}
 
Example #4
Source File: TileFrequencyOwner.java    From EnderStorage with MIT License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) {
    readFromPacket(PacketCustom.fromTilePacket(pkt));
}
 
Example #5
Source File: PacketCustom.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
public SUpdateTileEntityPacket toTilePacket(BlockPos pos) {
    return new SUpdateTileEntityPacket(pos, -6000, toNBTTag());
}
 
Example #6
Source File: PacketCustom.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@OnlyIn (Dist.CLIENT)
public static PacketCustom fromTilePacket(SUpdateTileEntityPacket tilePacket) {
    return fromNBTTag(tilePacket.getNbtCompound());
}
 
Example #7
Source File: ChoppingBlockTileEntity.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Nullable
@Override
public SUpdateTileEntityPacket getUpdatePacket()
{
    return new SUpdateTileEntityPacket(pos, 0, getUpdateTag());
}
 
Example #8
Source File: ChoppingBlockTileEntity.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt)
{
    handleUpdateTag(getBlockState(), pkt.getNbtCompound());
}
 
Example #9
Source File: DryingRackTileEntity.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public SUpdateTileEntityPacket getUpdatePacket()
{
    return new SUpdateTileEntityPacket(pos, 0, getUpdateTag());
}
 
Example #10
Source File: DryingRackTileEntity.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket packet)
{
    handleUpdateTag(getBlockState(), packet.getNbtCompound());
}