*Kinda* working now. Async the updateCache to io thread, and fix stream close issue

This commit is contained in:
TomTheFurry
2022-09-08 22:31:25 +08:00
parent 7366b543bd
commit cc554991fe
2 changed files with 3 additions and 2 deletions
@@ -99,7 +99,8 @@ public class BiomeWrapper implements IBiomeWrapper
try {
#if PRE_MC_1_18_2 Biome #else
Holder<Biome> #endif
biome = Biome.CODEC.decode(JsonOps.INSTANCE, JsonParser.parseString(str)).get().orThrow().getFirst();
biome = Biome.CODEC.decode(RegistryOps.create(JsonOps.INSTANCE, Minecraft.getInstance().level.registryAccess()),
JsonParser.parseString(str)).get().orThrow().getFirst();
return getBiomeWrapper(biome);
} catch (Exception e) {
throw new IOException("Failed to deserialize biome wrapper", e);