From 5035615028c3b2a535d46f4f4d25f9f89e3fadb1 Mon Sep 17 00:00:00 2001 From: nea Date: Mon, 24 Jul 2023 21:56:45 +0200 Subject: Fix flickering health bar in overworld --- .../thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/thatgravyboat/skyblockhud') diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java index c561fb7..ab468b8 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java @@ -2,6 +2,7 @@ package com.thatgravyboat.skyblockhud.mixins; import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.overlay.RPGHud; +import com.thatgravyboat.skyblockhud.location.RiftHandler; import com.thatgravyboat.skyblockhud.tracker.TrackerHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetHandlerPlayClient; @@ -69,7 +70,8 @@ public class MixinNetHandlerPlayClient { @Inject(method = "handleUpdateHealth(Lnet/minecraft/network/play/server/S06PacketUpdateHealth;)V", at = @At(value = "TAIL")) public void onHealth(S06PacketUpdateHealth packetIn, CallbackInfo ci) { - RPGHud.updateHealth(packetIn.getHealth(), (Minecraft.getMinecraft().thePlayer.getMaxHealth())); + if (RiftHandler.isInRift) + RPGHud.updateHealth(packetIn.getHealth(), (Minecraft.getMinecraft().thePlayer.getMaxHealth())); } } -- cgit