diff options
Diffstat (limited to 'src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java')
-rw-r--r-- | src/main/java/com/dulkirfabric/mixin/render/InGameHudMixin.java | 9 |
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(); + } } |