diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index 14abeb89..d7c4fb9b 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -2004,8 +2004,8 @@ public class Client implements IThreadListener { "Licht: " + chunk.getLightSub(pos, 0) + " (" + (this.world.dimension.hasSkyLight() ? + World.getSkyLightFor(pos.getY()) + " Himmel, " : "") + chunk.getLight(pos) + " Blöcke, " + String.format( "%.1f", this.renderer.getSunBrightness(1.0f) * 15.0f) + " Welt), A: " - + String.format("%.1f ° (%.1f, %.1f)", this.world.getCelestialAngle(1.0f), !this.world.dimension.hasRotation() ? 0.0f : ExtMath.cos((-90.0f + this.world.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI), - !this.world.dimension.hasRotation() ? -1.0f : ExtMath.sin((-90.0f + this.world.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI)) + "\n" + + + String.format("%.1f ° (%.1f, %.1f)", this.world.getCelestialAngle(1.0f), !this.world.dimension.hasDaylight() ? 0.0f : ExtMath.cos((-90.0f + this.world.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI), + !this.world.dimension.hasDaylight() ? -1.0f : ExtMath.sin((-90.0f + this.world.getCelestialAngle(1.0f)) / 180.0f * (float)Math.PI)) + "\n" + String.format("Zeit: %s" + (this.world.dimension.hasRotation() ? ", R %d / %d T" : "") + (this.world.dimension.hasOrbit() ? ", U %d / %d T" : ""), this.world.formatEpochSimple(), this.world.getRotation(), diff --git a/client/src/main/java/client/renderer/Renderer.java b/client/src/main/java/client/renderer/Renderer.java index 44529bec..4e5066a2 100755 --- a/client/src/main/java/client/renderer/Renderer.java +++ b/client/src/main/java/client/renderer/Renderer.java @@ -1135,12 +1135,12 @@ public class Renderer { int g = (int)(green * 255.0F); int b = (int)(blue * 255.0F); if(n == 240) { - this.sunColorRed = red * (world.dimension.hasSkyLight() ? sun : 1.0f); - this.sunColorGreen = green * (world.dimension.hasSkyLight() ? sun : 1.0f); - this.sunColorBlue = blue * (world.dimension.hasSkyLight() ? sun : 1.0f); - this.moonColorRed = red * (world.dimension.hasSkyLight() ? 1.0f - sun : 0.0f); - this.moonColorGreen = green * (world.dimension.hasSkyLight() ? 1.0f - sun : 0.0f); - this.moonColorBlue = blue * (world.dimension.hasSkyLight() ? 1.0f - sun : 0.0f); + this.sunColorRed = red * (world.dimension.hasDaylight() ? sun : 1.0f); + this.sunColorGreen = green * (world.dimension.hasDaylight() ? sun : 1.0f); + this.sunColorBlue = blue * (world.dimension.hasDaylight() ? sun : 1.0f); + this.moonColorRed = red * (world.dimension.hasDaylight() ? 1.0f - sun : 0.0f); + this.moonColorGreen = green * (world.dimension.hasDaylight() ? 1.0f - sun : 0.0f); + this.moonColorBlue = blue * (world.dimension.hasDaylight() ? 1.0f - sun : 0.0f); } else if(n == 15) { this.blockColorRed = red; diff --git a/client/src/main/java/client/renderer/Shader.java b/client/src/main/java/client/renderer/Shader.java index caf0ef03..207856b8 100644 --- a/client/src/main/java/client/renderer/Shader.java +++ b/client/src/main/java/client/renderer/Shader.java @@ -32,12 +32,12 @@ public enum Shader { float angle = -90.0f + Client.CLIENT.world.getCelestialAngle(Client.CLIENT.getTickFraction()); - float sunX = !Client.CLIENT.world.dimension.hasRotation() ? 0.0f : ExtMath.cos(angle / 180.0f * (float)Math.PI); - float sunY = !Client.CLIENT.world.dimension.hasRotation() ? -1.0f : ExtMath.sin(angle / 180.0f * (float)Math.PI); + float sunX = !Client.CLIENT.world.dimension.hasDaylight() ? 0.0f : ExtMath.cos(angle / 180.0f * (float)Math.PI); + float sunY = !Client.CLIENT.world.dimension.hasDaylight() ? -1.0f : ExtMath.sin(angle / 180.0f * (float)Math.PI); context.vec("sun_direction", sunX, sunY, 0.0f); - float moonX = !Client.CLIENT.world.dimension.hasRotation() ? 0.0f : ExtMath.cos((180.0f + angle) / 180.0f * (float)Math.PI); - float moonY = !Client.CLIENT.world.dimension.hasRotation() ? -1.0f : ExtMath.sin((180.0f + angle) / 180.0f * (float)Math.PI); + float moonX = !Client.CLIENT.world.dimension.hasDaylight() ? 0.0f : ExtMath.cos((180.0f + angle) / 180.0f * (float)Math.PI); + float moonY = !Client.CLIENT.world.dimension.hasDaylight() ? -1.0f : ExtMath.sin((180.0f + angle) / 180.0f * (float)Math.PI); context.vec("moon_direction", moonX, moonY, 0.0f); float sunRed = Client.CLIENT.renderer.getSunColorRed();