From 26c71df5427b1f89fd2ab7bcad6ad623cf124b3e Mon Sep 17 00:00:00 2001 From: Sen Date: Wed, 21 May 2025 13:51:51 +0200 Subject: [PATCH] misc fixes, rendering --- client/src/client/Client.java | 2 +- common/src/common/world/Chunk.java | 11 ++++++----- common/src/common/world/World.java | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/src/client/Client.java b/client/src/client/Client.java index 9922f2d..9ae4f1f 100755 --- a/client/src/client/Client.java +++ b/client/src/client/Client.java @@ -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 diff --git a/common/src/common/world/Chunk.java b/common/src/common/world/Chunk.java index 0228b27..c4cfd85 100755 --- a/common/src/common/world/Chunk.java +++ b/common/src/common/world/Chunk.java @@ -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); } diff --git a/common/src/common/world/World.java b/common/src/common/world/World.java index 6d991e3..869fcc4 100755 --- a/common/src/common/world/World.java +++ b/common/src/common/world/World.java @@ -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) {