String locale = VanillaByteBufUtils.readString(buffer);
byte viewDistance = buffer.readByte();
byte chatFlags = buffer.readByte();
byte difficulty = buffer.readByte();
boolean showCape = buffer.readByte() != 0;
return new PlayerLocaleViewDistanceMessage(locale, viewDistance, chatFlags, difficulty, showCape);
}