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 --- .../skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt | 3 +-- .../at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt index f90fbd625..b89677aa0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt @@ -18,7 +18,6 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TabListData -import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.math.round @@ -44,7 +43,7 @@ class CaptureFarmingGear { val farmingItems = farmingItems ?: return val resultList = mutableListOf() - val itemStack = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem() ?: return + val itemStack = InventoryUtils.getItemInHand() ?: return val itemID = itemStack.getInternalName_old() resultList.add(itemStack.displayName.toString()) resultList.add(itemID) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index e50a845da..9b1c920bd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -17,7 +17,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TabListData.Companion.getTabList import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay.getCurrentPet import io.github.moulberry.notenoughupdates.util.SkyBlockTime -import net.minecraft.client.Minecraft import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound import java.util.function.Supplier @@ -297,7 +296,7 @@ enum class DiscordStatus(private val displayMessageSupplier: Supplier?) } else item.getSubCompound("ExtraAttributes", false) } - val itemInHand = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem() + val itemInHand = InventoryUtils.getItemInHand() val itemName = itemInHand?.displayName?.removeColor() ?: "" val extraAttributes = getExtraAttributes(itemInHand) -- cgit