"Fix" world time.... (#693)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2024-10-29 20:22:24 -07:00
1 parent e43cd6f18e
commit 538b38898c
4 files changed
+8 -5

No files matched your search

@@ -53,7 +53,7 @@ public class ProgramUniforms {
private static long getCurrentTick() {
if (Minecraft.getMinecraft().theWorld != null) {
return Minecraft.getMinecraft().theWorld.getWorldTime();
return Minecraft.getMinecraft().theWorld.getTotalWorldTime();
} else {
return 0L;
}
@@ -109,7 +109,10 @@ public abstract class IrisGuiSlot extends GuiSlot {
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) {
@@ -157,7 +157,7 @@ public class HardcodedCustomUniforms {
}
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);
@@ -25,13 +25,13 @@ public final class WorldTimeUniforms {
}
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() {