import java.io.IOException;
public final class BlockActionCodec implements Codec<BlockActionMessage> {
@Override
public BlockActionMessage decode(ByteBuf buf) throws IOException {
BlockVector vector = GlowBufUtils.readBlockPosition(buf);
int data1 = buf.readByte();
int data2 = buf.readByte();
int blockType = ByteBufUtils.readVarInt(buf);
return new BlockActionMessage(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), data1, data2, blockType);
}