aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins/MixinItemStack.java
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-01-28 15:30:58 -0600
committeringlettronald <inglettronald@gmail.com>2023-01-28 15:30:58 -0600
commit7b6fef2966838dffcdecb5870204d363811f4b4f (patch)
treede6f37e760c313a6187a2a06361ce36d5a08052d /src/main/java/dulkirmod/mixins/MixinItemStack.java
parentd13f43266a82c81962af8471f471a7824a0bcf7b (diff)
downloadDulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.tar.gz
DulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.tar.bz2
DulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.zip
More tooltip rendering logic and adding vanquisher trigger
Diffstat (limited to 'src/main/java/dulkirmod/mixins/MixinItemStack.java')
-rw-r--r--src/main/java/dulkirmod/mixins/MixinItemStack.java27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinItemStack.java b/src/main/java/dulkirmod/mixins/MixinItemStack.java
deleted file mode 100644
index 76440ef..0000000
--- a/src/main/java/dulkirmod/mixins/MixinItemStack.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package dulkirmod.mixins;
-import dulkirmod.features.ScalableTooltips;
-import net.minecraft.entity.player.EntityPlayer;
-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.CallbackInfoReturnable;
-
-import java.util.List;
-
-@Mixin(ItemStack.class)
-public abstract class MixinItemStack {
-
- private static ItemStack previousStack;
-
- @Inject(method = "getTooltip", at = @At("HEAD"))
- public void onTooltip(EntityPlayer playerIn, boolean advanced, CallbackInfoReturnable<List<String>> cir) {
-
- ItemStack currentStack = (ItemStack)(Object)this;
- if (currentStack != previousStack) {
- // reset values here for scrollable tooltips
- ScalableTooltips.INSTANCE.resetPos();
- previousStack = currentStack;
- }
- }
-}