diff --git a/src/main/java/net/coderbot/iris/gl/program/ProgramUniforms.java b/src/main/java/net/coderbot/iris/gl/program/ProgramUniforms.java index 4460989d2..f5dc38b54 100644 --- a/src/main/java/net/coderbot/iris/gl/program/ProgramUniforms.java +++ b/src/main/java/net/coderbot/iris/gl/program/ProgramUniforms.java @@ -53,7 +53,7 @@ private void updateStage(ImmutableList uniforms) { private static long getCurrentTick() { if (Minecraft.getMinecraft().theWorld != null) { - return Minecraft.getMinecraft().theWorld.getWorldTime(); + return Minecraft.getMinecraft().theWorld.getTotalWorldTime(); } else { return 0L; } diff --git a/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java b/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java index 2596ffdaf..a7c47cc64 100644 --- a/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java +++ b/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java @@ -109,7 +109,10 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.amountScrolled += ((float) mouseY - this.initialClickY); this.initialClickY = mouseY; } else if (this.mc.currentScreen != null ){ - for (; !this.mc.gameSettings.touchscreen && Mouse.next(); this.mc.currentScreen.handleMouseInput()) { + while (!this.mc.gameSettings.touchscreen && Mouse.next()) { + if(this.mc.currentScreen != null) { + this.mc.currentScreen.handleMouseInput(); + } int dWheel = Mouse.getEventDWheel(); if (dWheel != 0) { diff --git a/src/main/java/net/coderbot/iris/uniforms/HardcodedCustomUniforms.java b/src/main/java/net/coderbot/iris/uniforms/HardcodedCustomUniforms.java index 24994aeaf..4045444c1 100644 --- a/src/main/java/net/coderbot/iris/uniforms/HardcodedCustomUniforms.java +++ b/src/main/java/net/coderbot/iris/uniforms/HardcodedCustomUniforms.java @@ -157,7 +157,7 @@ private static float getTimeAngle() { } private static int getWorldDayTime() { - return (int) (Minecraft.getMinecraft().theWorld.getWorldTime() % 24000L); + return (int) (Minecraft.getMinecraft().theWorld.getTotalWorldTime() % 24000L); // Level level = Minecraft.getMinecraft().theWorld; // long timeOfDay = level.getDayTime(); // long dayTime = ((DimensionTypeAccessor) level.dimensionType()).getFixedTime().orElse(timeOfDay % 24000L); diff --git a/src/main/java/net/coderbot/iris/uniforms/WorldTimeUniforms.java b/src/main/java/net/coderbot/iris/uniforms/WorldTimeUniforms.java index 170dc9477..9a2d5021c 100644 --- a/src/main/java/net/coderbot/iris/uniforms/WorldTimeUniforms.java +++ b/src/main/java/net/coderbot/iris/uniforms/WorldTimeUniforms.java @@ -25,13 +25,13 @@ public static void addWorldTimeUniforms(UniformHolder uniforms) { } static int getWorldDayTime() { - return (int) (getWorld().getWorldTime() % 24000L); + return (int) (getWorld().getTotalWorldTime() % 24000L); // long dayTime = ((DimensionTypeAccessor) getWorld().dimensionType()).getFixedTime().orElse(timeOfDay % 24000L); } private static int getWorldDay() { - return (int) (getWorld().getWorldTime() / 24000L); + return (int) (getWorld().getTotalWorldTime() / 24000L); } private static WorldClient getWorld() {