aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-07-23 21:47:02 -0500
committeringlettronald <inglettronald@gmail.com>2023-07-23 21:47:02 -0500
commitc56059b6c9d28d17d82de090c5a0b9d9382cb82c (patch)
treeaa1f6b2c4798502c6f2ccafff788eb04f17c8379 /src/main/java/com
parentc36dd88ff83ff09d5941d6772b5eefff0cd10665 (diff)
downloadDulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.tar.gz
DulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.tar.bz2
DulkirMod-Fabric-c56059b6c9d28d17d82de090c5a0b9d9382cb82c.zip
Chat stacking with lots of refactor
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
index f0b4988..7f90b3b 100644
--- a/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
+++ b/src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java
@@ -1,13 +1,11 @@
package com.dulkirfabric.mixin.render;
import com.dulkirfabric.config.DulkirConfig;
-import com.dulkirfabric.util.ScoreBoardUtils;
import com.dulkirfabric.util.Utils;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
-import net.minecraft.scoreboard.ScoreboardObjective;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -47,4 +45,11 @@ public class InGameHudMixin {
return 1;
return original;
}
+
+ @Inject(method = "renderHeldItemTooltip",
+ at = @At("HEAD"), cancellable = true)
+ public void changeItemDisplay (DrawContext context, CallbackInfo ci) {
+ if (DulkirConfig.ConfigVars.getConfigOptions().getHideHeldItemTooltip())
+ ci.cancel();
+ }
}