Some simple Biome related changes

This commit is contained in:
Frank 2021-09-23 16:19:30 +02:00
parent 8abcab32ec
commit 23bcbe1977
6 changed files with 16 additions and 10 deletions

View file

@ -341,8 +341,8 @@ public class BCLBiomeDef {
return new Biome.BiomeBuilder().precipitation(precipitation)
.biomeCategory(category)
.depth(depth)
.scale(0.2F)
//.depth(depth) //TODO: No longer available in 1.18
//.scale(0.2F)
.temperature(temperature)
.downfall(downfall)
.specialEffects(effects.build())

View file

@ -9,6 +9,7 @@ import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.Biome.BiomeCategory;
import net.minecraft.world.level.biome.BiomeSource;
import net.minecraft.world.level.biome.Biomes;
import net.minecraft.world.level.biome.Climate;
import net.minecraft.world.level.biome.TheEndBiomeSource;
import net.minecraft.world.level.levelgen.WorldgenRandom;
import net.minecraft.world.level.levelgen.synth.SimplexNoise;
@ -46,7 +47,7 @@ public class BCLibEndBiomeSource extends BiomeSource {
BiomeAPI.END_LAND_BIOME_PICKER.clearMutables();
BiomeAPI.END_VOID_BIOME_PICKER.clearMutables();
this.possibleBiomes.forEach(biome -> {
this.possibleBiomes().forEach(biome -> {
ResourceLocation key = biomeRegistry.getKey(biome);
if (!BiomeAPI.hasBiome(key)) {
BCLBiome bclBiome = new BCLBiome(key, biome, 1, 1);
@ -98,7 +99,7 @@ public class BCLibEndBiomeSource extends BiomeSource {
}
@Override
public Biome getNoiseBiome(int biomeX, int biomeY, int biomeZ) {
public Biome getNoiseBiome(int biomeX, int biomeY, int biomeZ, Climate.Sampler sampler) {
long i = (long) biomeX * (long) biomeX;
long j = (long) biomeZ * (long) biomeZ;
long check = GeneratorOptions.isFarEndBiomes() ? 65536L : 625L;

View file

@ -8,6 +8,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.Biome.BiomeCategory;
import net.minecraft.world.level.biome.BiomeSource;
import net.minecraft.world.level.biome.Climate;
import ru.bclib.BCLib;
import ru.bclib.api.BiomeAPI;
import ru.bclib.world.biomes.BCLBiome;
@ -35,7 +36,7 @@ public class BCLibNetherBiomeSource extends BiomeSource {
BiomeAPI.NETHER_BIOME_PICKER.clearMutables();
this.possibleBiomes.forEach(biome -> {
this.possibleBiomes().forEach(biome -> {
ResourceLocation key = biomeRegistry.getKey(biome);
if (!BiomeAPI.hasBiome(key)) {
BCLBiome bclBiome = new BCLBiome(key, biome, 1, 1);
@ -76,7 +77,7 @@ public class BCLibNetherBiomeSource extends BiomeSource {
}
@Override
public Biome getNoiseBiome(int biomeX, int biomeY, int biomeZ) {
public Biome getNoiseBiome(int biomeX, int biomeY, int biomeZ, Climate.Sampler sampler) {
if ((biomeX & 63) == 0 && (biomeZ & 63) == 0) {
biomeMap.clearCache();
}