3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 00:00:41 +01:00

Lower size of BiomeDefinitionsPacket

Dieser Commit ist enthalten in:
Camotoy 2022-12-09 13:39:24 -05:00
Ursprung 247edc6665
Commit 6876a90c3b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -181,12 +181,15 @@ public final class Registries {
POTION_MIXES = SimpleRegistry.create(PotionMixRegistryLoader::new);
ENCHANTMENTS = SimpleMappedRegistry.create("mappings/enchantments.json", EnchantmentRegistryLoader::new);
// TEMPORARY FIX TO MAKE OLD BIOMES NBT WORK WITH 1.19.30
// Remove unneeded client generation data from NbtMapBuilder
NbtMapBuilder biomesNbt = NbtMap.builder();
for (Map.Entry<String, Object> entry : BIOMES_NBT.get().entrySet()) {
String key = entry.getKey();
NbtMapBuilder value = ((NbtMap) entry.getValue()).toBuilder();
value.put("name_hash", key);
value.remove("minecraft:consolidated_features");
value.remove("minecraft:multinoise_generation_rules");
value.remove("minecraft:surface_material_adjustments");
value.remove( "minecraft:surface_parameters");
biomesNbt.put(key, value.build());
}
BIOMES_NBT.set(biomesNbt.build());