aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:36:57 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-15 10:36:57 +0200
commit5eae6a82b10cca07f3148f4d831ce285051634ca (patch)
treeae669f050b2f2aa8caeb3fde92dac7c07919d656 /src/main/java/at/hannibal2/skyhanni/features
parentb1a2491e9a84b8a4a6261b43f97d3a907d979f06 (diff)
downloadskyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.tar.gz
skyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.tar.bz2
skyhanni-5eae6a82b10cca07f3148f4d831ce285051634ca.zip
Added /shcopyinternalname and hotkey to copy internal names of items
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt3
2 files changed, 2 insertions, 4 deletions
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<String>()
- 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<String>?)
} 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)