[Fixed] Prevent crashes from null registry in Fog-Rendered (#69)
This commit is contained in:
parent
154e652991
commit
ecc5ea0eec
1 changed files with 9 additions and 6 deletions
|
@ -438,12 +438,15 @@ public class BiomeAPI {
|
||||||
public static BCLBiome getRenderBiome(Biome biome) {
|
public static BCLBiome getRenderBiome(Biome biome) {
|
||||||
BCLBiome endBiome = InternalBiomeAPI.CLIENT.get(biome);
|
BCLBiome endBiome = InternalBiomeAPI.CLIENT.get(biome);
|
||||||
if (endBiome == null) {
|
if (endBiome == null) {
|
||||||
var reg = BCLBiomeRegistry.registryOrNull();
|
var acc = WorldBootstrap.getLastRegistryAccessOrElseBuiltin();
|
||||||
ResourceLocation id = WorldBootstrap.getLastRegistryAccessOrElseBuiltin()
|
if (acc != null) {
|
||||||
.registryOrThrow(Registries.BIOME)
|
final Registry<BCLBiome> reg = BCLBiomeRegistry.registryOrNull();
|
||||||
.getKey(biome);
|
ResourceLocation id = acc
|
||||||
endBiome = BCLBiomeRegistry.getBiomeOrEmpty(id, reg);
|
.registryOrThrow(Registries.BIOME)
|
||||||
InternalBiomeAPI.CLIENT.put(biome, endBiome);
|
.getKey(biome);
|
||||||
|
endBiome = BCLBiomeRegistry.getBiomeOrEmpty(id, reg);
|
||||||
|
InternalBiomeAPI.CLIENT.put(biome, endBiome);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return endBiome;
|
return endBiome;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue