use of buildcraft.lib.net.MessageUpdateTile in project BuildCraft by BuildCraft.
the class TileBC_Neptune method sendNetworkUpdate.
public final void sendNetworkUpdate(int id, EntityPlayer target) {
if (hasWorld() && target instanceof EntityPlayerMP) {
MessageUpdateTile message = createNetworkUpdate(id);
MessageManager.sendTo(message, (EntityPlayerMP) target);
}
}
use of buildcraft.lib.net.MessageUpdateTile in project BuildCraft by BuildCraft.
the class TileBC_Neptune method sendNetworkGuiTick.
public final void sendNetworkGuiTick(EntityPlayer player) {
if (hasWorld() && !world.isRemote) {
MessageUpdateTile message = createNetworkUpdate(NET_GUI_TICK);
if (message.getPayloadSize() <= Short.BYTES) {
return;
}
MessageManager.sendTo(message, (EntityPlayerMP) player);
}
}
use of buildcraft.lib.net.MessageUpdateTile in project BuildCraft by BuildCraft.
the class TileBC_Neptune method createMessage.
public final MessageUpdateTile createMessage(int id, IPayloadWriter writer) {
PacketBufferBC buffer = new PacketBufferBC(Unpooled.buffer());
buffer.writeShort(id);
writer.write(buffer);
return new MessageUpdateTile(pos, buffer);
}
Aggregations