Skip to content

Commit

Permalink
revert: e4ade18
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Mar 23, 2024
1 parent 6d5e1e9 commit 6e97395
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
public class AllayBiomeTypeRegistry extends SimpleMappedRegistry<BiomeType, BiomeData, Map<BiomeType, BiomeData>> implements BiomeTypeRegistry {

// TODO: 暂时不知道为什么MutableNbtMap存储的信息转换回NbtMap后部分群系客户端不认
// 此vanillaBiomeDefinition仅用于发包,并将在解决上述问题后被移除
private NbtMap vanillaBiomeDefinition;
private MutableNbtMap biomeDefinition;

public AllayBiomeTypeRegistry() {
Expand All @@ -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];
Expand All @@ -56,7 +52,6 @@ public BiomeData register(BiomeType biomeType, BiomeData biomeData) {

@Override
public NbtMap getBiomeDefinition() {
// return vanillaBiomeDefinition;
return biomeDefinition.build();
}
}

0 comments on commit 6e97395

Please sign in to comment.