From 5eae6a82b10cca07f3148f4d831ce285051634ca Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:36:57 +0200 Subject: Added /shcopyinternalname and hotkey to copy internal names of items --- src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test/command') diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt index d2f0b60ab..4fc82bbc3 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyItemCommand.kt @@ -1,18 +1,18 @@ package at.hannibal2.skyhanni.test.command import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.OSUtils -import net.minecraft.client.Minecraft object CopyItemCommand { fun command(args: Array) { try { val resultList = mutableListOf() - val itemStack = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem()!! + val itemStack = InventoryUtils.getItemInHand() ?: return resultList.add("ITEM LORE") resultList.add("display name: '" + itemStack.displayName.toString() + "'") val itemID = itemStack.getInternalName_old() -- cgit