use clienttickcounter

This commit is contained in:
yrsegal@gmail.com 2022-04-27 21:56:26 -04:00
parent 4f23a47771
commit 9beb0ad43a
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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...