throw new IOException("Read Window Type is invalid");
}
String title = VanillaByteBufUtils.readString(buffer);
int slots = buffer.readUnsignedByte();
boolean useTitle = buffer.readUnsignedByte() != 0;
return new WindowOpenMessage(id, type, title, slots, useTitle);
}