Search in sources :

Example 1 with MessageUpdateTile

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);
    }
}
Also used : MessageUpdateTile(buildcraft.lib.net.MessageUpdateTile) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP)

Example 2 with MessageUpdateTile

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);
    }
}
Also used : MessageUpdateTile(buildcraft.lib.net.MessageUpdateTile)

Example 3 with MessageUpdateTile

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);
}
Also used : MessageUpdateTile(buildcraft.lib.net.MessageUpdateTile) PacketBufferBC(buildcraft.lib.net.PacketBufferBC)

Aggregations

MessageUpdateTile (buildcraft.lib.net.MessageUpdateTile)3 PacketBufferBC (buildcraft.lib.net.PacketBufferBC)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1