diff options
Diffstat (limited to 'src/main/java/at')
4 files changed, 31 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 978885f66..669824c0b 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -67,6 +67,7 @@ import at.hannibal2.skyhanni.features.summonings.SummoningMobManager import at.hannibal2.skyhanni.features.summonings.SummoningSoulsName import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.PacketTest +import at.hannibal2.skyhanni.test.ShowItemUuid import at.hannibal2.skyhanni.test.SkyHanniTestCommand import at.hannibal2.skyhanni.test.TestBingo import at.hannibal2.skyhanni.test.command.CopyNearbyParticlesCommand @@ -297,6 +298,7 @@ class SkyHanniMod { loadModule(DetectBrokenHyperion()) loadModule(RestorePieceOfWizardPortalLore()) loadModule(QuickModMenuSwitch) + loadModule(ShowItemUuid()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/DevData.java b/src/main/java/at/hannibal2/skyhanni/config/features/DevData.java index 85120f929..e8061e926 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/DevData.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/DevData.java @@ -42,12 +42,18 @@ public class DevData { public boolean modMenuLog = false; @Expose - @ConfigOption(name = "Show internal name", desc = "Show internal names in item lores.") + @ConfigOption(name = "Show internal name", desc = "Show internal names in item lore.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean showInternalName = false; @Expose + @ConfigOption(name = "Show item UUID", desc = "Show the Unique Identifier of items. in the lore.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean showItemUuid = false; + + @Expose public Position debugPos = new Position(10, 10, false, true); @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt new file mode 100644 index 000000000..511c26119 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.test + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getItemUuid +import net.minecraftforge.event.entity.player.ItemTooltipEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class ShowItemUuid { + + @SubscribeEvent + fun onItemTooltipLow(event: ItemTooltipEvent) { + if (!SkyHanniMod.feature.dev.showItemUuid) return + val itemStack = event.itemStack + if (itemStack != null) { + itemStack.getItemUuid()?.let { + event.toolTip.add("ยง7Item UUID: '$it'") + } + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 8d937956d..87308e495 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -139,6 +139,8 @@ object SkyBlockItemModifierUtils { fun ItemStack.getRecipientName() = getAttributeString("recipient_name") + fun ItemStack.getItemUuid() = getAttributeString("uuid") + fun ItemStack.getGemstones() = getExtraAttributes()?.let { val list = mutableListOf<GemstoneSlot>() for (attributes in it.keySet) { |