*Kinda* working now. Async the updateCache to io thread, and fix stream close issue
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user