@Override public IMessage onMessage(MessageTEToClient message, MessageContext context) { TileEntity te = Minecraft.getMinecraft() .theWorld .getTileEntity( new BlockPos( message.bytes.readInt(), message.bytes.readInt(), message.bytes.readInt())); if (te instanceof TileEntityMachine) { ((TileEntityMachine) te).readToClientData(message.bytes); } return null; }
@Override public void toBytes(ByteBuf bytes) { tem.writeToClientData(bytes); }