[Change] Removed some use of internal FAPI Biome API (#2)
This commit is contained in:
parent
a83117b8a9
commit
e850173d9e
2 changed files with 9 additions and 9 deletions
|
@ -21,7 +21,7 @@ import net.minecraft.world.level.biome.Biome;
|
|||
import net.minecraft.world.level.biome.BiomeSource;
|
||||
import net.minecraft.world.level.biome.Climate;
|
||||
|
||||
import net.fabricmc.fabric.impl.biome.NetherBiomeData;
|
||||
import net.fabricmc.fabric.api.biome.v1.NetherBiomes;
|
||||
|
||||
import org.apache.commons.lang3.function.TriFunction;
|
||||
|
||||
|
@ -148,7 +148,7 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource {
|
|||
|
||||
|
||||
private static boolean isValidNetherBiome(Holder<Biome> biome, ResourceLocation location) {
|
||||
return NetherBiomeData.canGenerateInNether(biome.unwrapKey().get()) ||
|
||||
return NetherBiomes.canGenerateInNether(biome.unwrapKey().get()) ||
|
||||
biome.is(BiomeTags.IS_NETHER) ||
|
||||
BiomeAPI.wasRegisteredAsNetherBiome(location);
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource {
|
|||
private static boolean isValidNonVanillaNetherBiome(Holder<Biome> biome, ResourceLocation location) {
|
||||
return (
|
||||
!"minecraft".equals(location.getNamespace()) &&
|
||||
NetherBiomeData.canGenerateInNether(biome.unwrapKey().get())) ||
|
||||
NetherBiomes.canGenerateInNether(biome.unwrapKey().get())) ||
|
||||
BiomeAPI.wasRegisteredAs(location, BiomeAPI.BiomeType.BCL_NETHER);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
|||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.impl.biome.NetherBiomeData;
|
||||
import net.fabricmc.fabric.impl.biome.TheEndBiomeData;
|
||||
import net.fabricmc.fabric.api.biome.v1.NetherBiomes;
|
||||
import net.fabricmc.fabric.api.biome.v1.TheEndBiomes;
|
||||
|
||||
import com.google.common.base.Suppliers;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -200,7 +200,7 @@ public class BiomeAPI {
|
|||
|
||||
ResourceKey<Biome> key = getBiomeKey(bclBiome.getBiome());
|
||||
if (bclBiome.allowFabricRegistration()) {
|
||||
bclBiome.forEachClimateParameter(p -> NetherBiomeData.addNetherBiome(key, p));
|
||||
bclBiome.forEachClimateParameter(p -> NetherBiomes.addNetherBiome(key, p));
|
||||
}
|
||||
return bclBiome;
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ public class BiomeAPI {
|
|||
float weight = biome.getGenChance();
|
||||
ResourceKey<Biome> key = getBiomeKey(biome.getBiome());
|
||||
if (biome.allowFabricRegistration()) {
|
||||
TheEndBiomeData.addEndBiomeReplacement(Biomes.END_HIGHLANDS, key, weight);
|
||||
TheEndBiomeData.addEndBiomeReplacement(Biomes.END_MIDLANDS, key, weight);
|
||||
TheEndBiomes.addHighlandsBiome(key, weight);
|
||||
//TheEndBiomes.addMidlandsBiome(key, weight);
|
||||
}
|
||||
return biome;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ public class BiomeAPI {
|
|||
float weight = biome.getGenChance();
|
||||
ResourceKey<Biome> key = getBiomeKey(biome.getBiome());
|
||||
if (biome.allowFabricRegistration()) {
|
||||
TheEndBiomeData.addEndBiomeReplacement(Biomes.SMALL_END_ISLANDS, key, weight);
|
||||
TheEndBiomes.addSmallIslandsBiome(key, weight);
|
||||
}
|
||||
return biome;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue