diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt | 3 |
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) |