aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiScreenHook.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiScreen.java18
2 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiScreenHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiScreenHook.kt
new file mode 100644
index 000000000..6ed537234
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiScreenHook.kt
@@ -0,0 +1,8 @@
+package at.hannibal2.skyhanni.mixins.hooks
+
+import at.hannibal2.skyhanni.events.RenderItemTooltipEvent
+import net.minecraft.item.ItemStack
+
+fun renderToolTip(stack: ItemStack) {
+ RenderItemTooltipEvent(stack).postAndCatch()
+} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiScreen.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiScreen.java
new file mode 100644
index 000000000..9da6faf3a
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiScreen.java
@@ -0,0 +1,18 @@
+package at.hannibal2.skyhanni.mixins.transformers.gui;
+
+import at.hannibal2.skyhanni.mixins.hooks.GuiScreenHookKt;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.item.ItemStack;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(GuiScreen.class)
+public class MixinGuiScreen {
+
+ @Inject(method = "renderToolTip", at = @At("TAIL"))
+ public void renderToolTip(ItemStack stack, int x, int y, CallbackInfo ci) {
+ GuiScreenHookKt.renderToolTip(stack);
+ }
+}