@Override
public ByteBuf encode(WindowClickMessage message) throws IOException {
ByteBuf buffer = Unpooled.buffer();
buffer.writeByte(message.getWindowInstanceId());
buffer.writeShort(message.getSlot());
buffer.writeByte(message.getButton());
buffer.writeShort(message.getTransaction());
buffer.writeByte(message.getMode());
VanillaByteBufUtils.writeItemStack(buffer, message.get());
return buffer;