From dd5bb2205b4077fd793a7fbca7e6e4772dffdbe8 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 27 Feb 2023 23:25:48 +0100 Subject: fix: don't fire twice per tick --- src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java index 934a1d8..22e1bf2 100644 --- a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java +++ b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java @@ -18,6 +18,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.eventbus.api.SubscribeEvent; public class InfoDisplay extends HudModule implements ICommons { @@ -75,6 +76,7 @@ public class InfoDisplay extends HudModule implements ICommons { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { if (!this.speed.get()) return; + if (event.phase == Phase.END) return; if (MC.player != null) { this.instant_speed = this.last_position.distanceTo(MC.player.position()); -- cgit v1.2.3-56-ga3b1