12131415161718
@Override public DiggingMessage decode(ByteBuf buf) throws IOException { int state = buf.readByte(); BlockVector pos = GlowBufUtils.readBlockPosition(buf); int face = buf.readByte(); return new DiggingMessage(state, pos.getBlockX(), pos.getBlockY(), pos.getBlockZ(), face); }
18192021222324
int state = buffer.readUnsignedByte(); int x = buffer.readInt(); int y = buffer.readUnsignedByte(); int z = buffer.readInt(); int face = buffer.readUnsignedByte(); return new DiggingMessage(state, x, y, z, face); }