Search in sources :

Example 1 with MessageContainer

use of buildcraft.lib.net.MessageContainer in project BuildCraft by BuildCraft.

the class ContainerBC_Neptune method sendMessage.

public final void sendMessage(int id, IPayloadWriter writer) {
    PacketBufferBC payload = PacketBufferBC.write(writer);
    MessageContainer message = new MessageContainer(windowId, id, payload);
    if (player.world.isRemote) {
        MessageManager.sendToServer(message);
    } else {
        MessageManager.sendTo(message, (EntityPlayerMP) player);
    }
}
Also used : MessageContainer(buildcraft.lib.net.MessageContainer) PacketBufferBC(buildcraft.lib.net.PacketBufferBC)

Aggregations

MessageContainer (buildcraft.lib.net.MessageContainer)1 PacketBufferBC (buildcraft.lib.net.PacketBufferBC)1