aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-24 21:56:45 +0200
committernea <nea@nea.moe>2023-07-24 21:56:45 +0200
commit5035615028c3b2a535d46f4f4d25f9f89e3fadb1 (patch)
tree5271fc7a4d5b128198482fcfdc5edf25a93dda52
parent03caeff11e629c2897bd32728191ca1cd89bdf94 (diff)
downloadSkyblockHud-Death-Defied-5035615028c3b2a535d46f4f4d25f9f89e3fadb1.tar.gz
SkyblockHud-Death-Defied-5035615028c3b2a535d46f4f4d25f9f89e3fadb1.tar.bz2
SkyblockHud-Death-Defied-5035615028c3b2a535d46f4f4d25f9f89e3fadb1.zip
Fix flickering health bar in overworld
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java4
1 files changed, 3 insertions, 1 deletions
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()));
}
}