aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-16 03:25:03 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-16 03:25:03 -0230
commit7f0d5d804ff8b327e7f5bc522a2732025dd39545 (patch)
tree73d7088d90a2a4d5141ca6363c5c4c0a12e237e5 /src/main/java/com/thatgravyboat/skyblockhud/mixins
parent6bebc34cac85722ba7462c37a09b378403344f51 (diff)
downloadSkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.tar.gz
SkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.tar.bz2
SkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.zip
Added mining bar mode for moveable or static
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
index 2bba720..6a4213d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
@@ -1,7 +1,5 @@
package com.thatgravyboat.skyblockhud.mixins;
-import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
-
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.Utils;
import com.thatgravyboat.skyblockhud.overlay.MiningHud;
@@ -16,6 +14,8 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
+
@Mixin(GuiIngameForge.class)
public class MixinGuiIngameForge {
@@ -64,11 +64,13 @@ public class MixinGuiIngameForge {
ci.cancel();
if (prePost(EXPERIENCE, eventParent)) return;
postPost(EXPERIENCE, eventParent);
- } else if (!SkyblockHud.config.renderer.hideXpBar && (SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar) && SkyblockHud.hasSkyblockScoreboard()) {
- if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
- ci.cancel();
- if (prePost(EXPERIENCE, eventParent)) return;
- postPost(EXPERIENCE, eventParent);
+ }else if (SkyblockHud.config.mining.barMode == 1) {
+ if (!SkyblockHud.config.renderer.hideXpBar && (SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar) && SkyblockHud.hasSkyblockScoreboard()) {
+ if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
+ ci.cancel();
+ if (prePost(EXPERIENCE, eventParent)) return;
+ postPost(EXPERIENCE, eventParent);
+ }
}
}
}
@@ -79,6 +81,14 @@ public class MixinGuiIngameForge {
ci.cancel();
if (prePost(JUMPBAR, eventParent)) return;
postPost(JUMPBAR, eventParent);
+ }else if (SkyblockHud.config.mining.barMode == 1) {
+ if (!SkyblockHud.config.renderer.hideXpBar && (SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar) && SkyblockHud.hasSkyblockScoreboard()) {
+ if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
+ ci.cancel();
+ if (prePost(JUMPBAR, eventParent)) return;
+ postPost(JUMPBAR, eventParent);
+ }
+ }
}
}