diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index f5d6b7943..34a8e96a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.features.garden.farming.GardenBestCropTime import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed import at.hannibal2.skyhanni.features.garden.inventory.SkyMartCopperPrice import at.hannibal2.skyhanni.utils.BlockUtils.isBabyCrop +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec @@ -91,7 +92,7 @@ object GardenAPI { } private fun checkItemInHand() { - val toolItem = Minecraft.getMinecraft().thePlayer.heldItem + val toolItem = InventoryUtils.getItemInHand() val crop = toolItem?.getCropType() val newTool = getToolInHand(toolItem, crop) if (toolInHand != newTool) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index aedcab012..129eba0eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.getSpeed import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.isSpeedDataEmpty +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList @@ -24,7 +25,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getReforgeName import at.hannibal2.skyhanni.utils.StringUtils.removeColor import kotlinx.coroutines.launch -import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -107,7 +107,7 @@ object CropMoneyDisplay { var extraNetherWartPrices = 0.0 GardenAPI.getCurrentlyFarmedCrop()?.let { - val reforgeName = Minecraft.getMinecraft().thePlayer.heldItem?.getReforgeName() + val reforgeName = InventoryUtils.getItemInHand()?.getReforgeName() toolHasBountiful?.put(it, reforgeName == "bountiful") if (GardenAPI.mushroomCowPet && it != CropType.MUSHROOM) { |