From 9beb0ad43a2da28d209a213d2b3e01a7f4b10a79 Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Wed, 27 Apr 2022 21:56:26 -0400 Subject: [PATCH] use clienttickcounter --- .../at/petrak/hexcasting/client/HexAdditionalRenderers.java | 2 +- Common/src/main/java/at/petrak/hexcasting/client/RenderLib.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/client/HexAdditionalRenderers.java b/Common/src/main/java/at/petrak/hexcasting/client/HexAdditionalRenderers.java index 8ef35715..5f7dc78a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/HexAdditionalRenderers.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/HexAdditionalRenderers.java @@ -53,7 +53,7 @@ public class HexAdditionalRenderers { sentinel.position().y - playerPos.y, sentinel.position().z - playerPos.z); - var time = mc.level.getLevelData().getGameTime() + partialTicks; + var time = ClientTickCounter.getTickCount() + partialTicks; var bobSpeed = 1f / 20; var magnitude = 0.1f; ps.translate(0, Mth.sin(bobSpeed * time) * magnitude, 0); diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RenderLib.kt b/Common/src/main/java/at/petrak/hexcasting/client/RenderLib.kt index fb138d77..639fa70d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RenderLib.kt +++ b/Common/src/main/java/at/petrak/hexcasting/client/RenderLib.kt @@ -170,7 +170,7 @@ object RenderLib { return emptyList() } val mc = Minecraft.getInstance() - val zSeed = (mc.frameTime.toDouble() + (mc.level?.levelData?.gameTime ?: 0)) * speed + val zSeed = (mc.frameTime.toDouble() + ClientTickCounter.getTickCount()) * speed // Create our output list of zap points val zappyPts = mutableListOf(points[0]) // For each segment in the original...