mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-01 23:47:50 +00:00
Some additional logging
This commit is contained in:
parent
f14d22b264
commit
c4f093210a
@ -51,13 +51,35 @@ public final class LifecycleBiomeUtil {
|
||||
Registry<net.minecraft.world.biome.Biome> registry) {
|
||||
RegistryKey<net.minecraft.world.biome.Biome> vanilla = ((ProtoPlatformBiome) biome.getPlatformBiome()).get(registry);
|
||||
|
||||
if (vanilla == null) {
|
||||
logger.error("""
|
||||
Failed to get Vanilla Biome Regiestry key!
|
||||
Terra Biome ID: {}
|
||||
Vanilla Biome: {}""", biome.getID(), biome.getPlatformBiome());
|
||||
}
|
||||
|
||||
if(pack.getContext().get(PreLoadCompatibilityOptions.class).useVanillaBiomes()) {
|
||||
((ProtoPlatformBiome) biome.getPlatformBiome()).setDelegate(registry.getEntry(registry.get(vanilla)));
|
||||
} else {
|
||||
VanillaBiomeProperties vanillaBiomeProperties = biome.getContext().get(VanillaBiomeProperties.class);
|
||||
|
||||
net.minecraft.world.biome.Biome minecraftBiome = BiomeUtil.createBiome(Objects.requireNonNull(registry.get(vanilla)),
|
||||
|
||||
net.minecraft.world.biome.Biome vanilaBiome = registry.get(vanilla);
|
||||
if (vanilaBiome == null) {
|
||||
String vanillaBiomeName;
|
||||
if (vanilla != null ) {
|
||||
vanillaBiomeName = vanilla.getValue().toString();
|
||||
} else {
|
||||
vanillaBiomeName = "NULL";
|
||||
}
|
||||
logger.error("""
|
||||
Failed to get Vanilla Biome!
|
||||
Terra Biome ID: {}
|
||||
Vanilla Biome: {}""", biome.getID(), vanillaBiomeName);
|
||||
return;
|
||||
}
|
||||
|
||||
net.minecraft.world.biome.Biome minecraftBiome = BiomeUtil.createBiome(Objects.requireNonNull(vanilaBiome),
|
||||
vanillaBiomeProperties);
|
||||
|
||||
Identifier identifier = Identifier.of("terra", BiomeUtil.createBiomeID(pack, id));
|
||||
|
Loading…
x
Reference in New Issue
Block a user