diff --git a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/TerraBiomeSource.java b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/TerraBiomeSource.java index 49bfedd28..e90e5d46c 100644 --- a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/TerraBiomeSource.java +++ b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/TerraBiomeSource.java @@ -17,6 +17,11 @@ package com.dfsek.terra.fabric.generation; +import com.dfsek.terra.api.config.ConfigPack; +import com.dfsek.terra.api.world.biome.generation.BiomeProvider; +import com.dfsek.terra.fabric.data.Codecs; +import com.dfsek.terra.fabric.util.ProtoPlatformBiome; + import com.mojang.serialization.Codec; import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.RegistryEntry; @@ -27,11 +32,6 @@ import org.slf4j.LoggerFactory; import java.util.stream.StreamSupport; -import com.dfsek.terra.api.config.ConfigPack; -import com.dfsek.terra.api.world.biome.generation.BiomeProvider; -import com.dfsek.terra.fabric.data.Codecs; -import com.dfsek.terra.fabric.util.ProtoPlatformBiome; - public class TerraBiomeSource extends BiomeSource { @@ -65,11 +65,12 @@ public class TerraBiomeSource extends BiomeSource { @Override public RegistryEntry getBiome(int biomeX, int biomeY, int biomeZ, MultiNoiseSampler noiseSampler) { - return biomeRegistry.getOrCreateEntry(((ProtoPlatformBiome) pack - .getBiomeProvider() - .getBiome(biomeX << 2, biomeY << 2, biomeZ << 2, seed) - .getPlatformBiome()) - .getDelegate()); + return biomeRegistry + .entryOf(((ProtoPlatformBiome) pack + .getBiomeProvider() + .getBiome(biomeX << 2, biomeY << 2, biomeZ << 2, seed) + .getPlatformBiome()).getDelegate() + ); } public BiomeProvider getProvider() { diff --git a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/util/TagUtil.java b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/util/TagUtil.java index 303d02ed0..e39194234 100644 --- a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/util/TagUtil.java +++ b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/util/TagUtil.java @@ -57,14 +57,7 @@ public final class TagUtil { .computeIfAbsent( tag, t -> new ArrayList<>()) - .add(FabricUtil - .getEntry( - registry, - terra.getKey() - .orElseThrow() - .getValue()) - .orElseThrow())); - + .add(terra)); }, () -> logger.error( "No such biome: {}",