misc fixes, rendering

This commit is contained in:
Sen 2025-05-21 13:51:51 +02:00
parent 7b6cff41c5
commit 26c71df542
3 changed files with 8 additions and 7 deletions

View file

@ -1753,7 +1753,7 @@ public class Client implements IThreadListener {
+ String.format("%.3f", this.world.getCelestialAngle(1.0f));
}
float temp = this.world.getTempOffset() + (biome != null ? biome.getTemperature(blockpos) : 0.0f);
float temp = Math.max(this.world.getTempOffset() + (biome != null ? biome.getTemperature(blockpos) : 0.0f), 0.0f);
long ticked = System.currentTimeMillis() - this.lastTicked;
return

View file

@ -683,6 +683,11 @@ public class Chunk {
int y = ExtMath.floord(entity.posY / 16.0D);
entity.addedToChunk = true;
entity.chunkCoordX = this.xPos;
entity.chunkCoordY = y;
entity.chunkCoordZ = this.zPos;
if(y < 0) {
y = 0;
}
@ -690,11 +695,7 @@ public class Chunk {
if(y >= this.entities.length) {
y = this.entities.length - 1;
}
entity.addedToChunk = true;
entity.chunkCoordX = this.xPos;
entity.chunkCoordY = y;
entity.chunkCoordZ = this.zPos;
this.entities[y].add(entity);
}

View file

@ -1562,7 +1562,7 @@ public abstract class World implements IWorldAccess {
}
public float getTemperatureK(BlockPos pos) {
return this.temp + this.getBiomeGenForCoords(pos).getTemperature(pos);
return Math.max(this.temp + this.getBiomeGenForCoords(pos).getTemperature(pos), 0.0f);
}
public float getTemperatureC(BlockPos pos) {