biome rework test 2

This commit is contained in:
Sen 2025-07-23 00:59:37 +02:00
parent b524eeeaa3
commit eec61c9258
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
6 changed files with 10 additions and 7 deletions

View file

@ -2353,7 +2353,7 @@ public final class WorldServer extends AWorldServer {
}
public float getGenTemperature(int x, int z) {
return this.dimension.getTemperature() + (this.biomeGen == null ? 0.0f : this.biomeGen.getBiomeAt(x, z).temperature);
return World.ABSOLUTE_ZERO + this.dimension.getTemperature() + this.dimension.getOrbitOffset() * 0.5f + (this.biomeGen == null ? 0.0f : this.biomeGen.getBiomeAt(x, z).temperature);
}
public float getGenHumidity(int x, int z) {

View file

@ -65,7 +65,7 @@ public class ReplacerAltSimple extends ReplacerBiome
if (by < this.seaLevel && (surface == null || surface.getBlock() == Blocks.air))
{
if (this.freeze && world.getTemperatureC(pos.set(x, by, z)) <= 0.0F)
if (this.freeze && world.getTemperatureC(pos.set((x & ~15) | bz, by, (z & ~15) | bx)) <= 0.0F)
{
surface = Blocks.ice.getState();
}

View file

@ -24,8 +24,8 @@ public class ReplacerTerranian extends ReplacerAltSimple {
public void genTerrainBlocks(WorldServer world, Random rand, ChunkPrimer primer, int x, int z, double noise)
{
float absTemp = world.getGenTemperature(x, z);
float humidity = world.getGenHumidity(x, z);
float absTemp = world.getGenTemperature((x & ~15) | (z & 15), (z & ~15) | (x & 15));
float humidity = world.getGenHumidity((x & ~15) | (z & 15), (z & ~15) | (x & 15));
State topBlock = this.surface;
State fillerBlock = this.top;