diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2024-06-07 11:40:30 +0800 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2024-06-10 12:21:42 +0800 |
commit | dcbbea4a299e2be7afcb4fb986504d3ef7475405 (patch) | |
tree | bb63f977ca87b8edbff2e98aa7d7c87335f9d76b /src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java | |
parent | ebd5ccd1620c7857c621f9c04b1f87ab11c08cbc (diff) | |
download | Skyblocker-dcbbea4a299e2be7afcb4fb986504d3ef7475405.tar.gz Skyblocker-dcbbea4a299e2be7afcb4fb986504d3ef7475405.tar.bz2 Skyblocker-dcbbea4a299e2be7afcb4fb986504d3ef7475405.zip |
Add potion level slot text
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java b/src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java index b57ee32a..6797cb61 100644 --- a/src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java +++ b/src/main/java/de/hysky/skyblocker/mixins/ItemStackMixin.java @@ -9,6 +9,7 @@ import de.hysky.skyblocker.skyblock.item.tooltip.ItemTooltip; import de.hysky.skyblocker.utils.ItemUtils; import de.hysky.skyblocker.utils.Utils; import it.unimi.dsi.fastutil.ints.IntIntPair; +import net.minecraft.component.ComponentHolder; import net.minecraft.component.type.ItemEnchantmentsComponent; import net.minecraft.item.ItemStack; import net.minecraft.item.TooltipAppender; @@ -28,7 +29,7 @@ import java.util.Locale; import java.util.Optional; @Mixin(ItemStack.class) -public abstract class ItemStackMixin implements SkyblockerStack { +public abstract class ItemStackMixin implements ComponentHolder, SkyblockerStack { @Shadow public abstract int getDamage(); @@ -51,7 +52,7 @@ public abstract class ItemStackMixin implements SkyblockerStack { @ModifyReturnValue(method = "getName", at = @At("RETURN")) private Text skyblocker$customItemNames(Text original) { if (Utils.isOnSkyblock()) { - return SkyblockerConfigManager.get().general.customItemNames.getOrDefault(ItemUtils.getItemUuid((ItemStack) (Object) this), original); + return SkyblockerConfigManager.get().general.customItemNames.getOrDefault(ItemUtils.getItemUuid(this), original); } return original; |