From 6e97395fb3c8d2f34ff2b02fdf2a3f2a55539b45 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sat, 23 Mar 2024 15:24:46 +0800 Subject: [PATCH] revert: e4ade181661d04cbe7cdc26baa3e92257ec60a14 --- .../allaymc/server/world/biome/AllayBiomeTypeRegistry.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Allay-Server/src/main/java/org/allaymc/server/world/biome/AllayBiomeTypeRegistry.java b/Allay-Server/src/main/java/org/allaymc/server/world/biome/AllayBiomeTypeRegistry.java index 1ce1c22e9..1fe4d7332 100644 --- a/Allay-Server/src/main/java/org/allaymc/server/world/biome/AllayBiomeTypeRegistry.java +++ b/Allay-Server/src/main/java/org/allaymc/server/world/biome/AllayBiomeTypeRegistry.java @@ -21,9 +21,6 @@ */ public class AllayBiomeTypeRegistry extends SimpleMappedRegistry> implements BiomeTypeRegistry { - // TODO: 暂时不知道为什么MutableNbtMap存储的信息转换回NbtMap后部分群系客户端不认 - // 此vanillaBiomeDefinition仅用于发包,并将在解决上述问题后被移除 - private NbtMap vanillaBiomeDefinition; private MutableNbtMap biomeDefinition; public AllayBiomeTypeRegistry() { @@ -35,8 +32,7 @@ public AllayBiomeTypeRegistry() { private void loadVanillaBiomeDefinition() { try (InputStream stream = AllayBiomeTypeRegistry.class.getClassLoader().getResourceAsStream("biome_definitions.nbt")) { assert stream != null; - vanillaBiomeDefinition = (NbtMap) NbtUtils.createGZIPReader(stream).readTag(); - biomeDefinition = MutableNbtMap.from(vanillaBiomeDefinition); + biomeDefinition = MutableNbtMap.from((NbtMap) NbtUtils.createGZIPReader(stream).readTag()); int i = 0; for (var biome : biomeDefinition.entrySet()) { var type = VanillaBiomeId.values()[i]; @@ -56,7 +52,6 @@ public BiomeData register(BiomeType biomeType, BiomeData biomeData) { @Override public NbtMap getBiomeDefinition() { -// return vanillaBiomeDefinition; return biomeDefinition.build(); } }