diff options
author | alemi <me@alemi.dev> | 2023-02-27 23:25:48 +0100 |
---|---|---|
committer | alemi <me@alemi.dev> | 2023-02-27 23:26:08 +0100 |
commit | dd5bb2205b4077fd793a7fbca7e6e4772dffdbe8 (patch) | |
tree | 92879a4168755afe744b331fdddf2a7e77711d12 /src/main | |
parent | acf78a429a495920b4f8a287d30d230d829a19cf (diff) |
fix: don't fire twice per tick
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java | 2 |
1 files changed, 2 insertions, 0 deletions
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()); |