aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-15 14:58:33 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-15 14:58:33 +0200
commit9cb056569bc5e55702caaeec59a77e1193716e42 (patch)
treecfd50b7f2e60bd51fe312c8869a03ba748147e6a
parent8a45343eff014a98666ba9e4d4d40f69a7722e88 (diff)
downloadSkyHanni-9cb056569bc5e55702caaeec59a77e1193716e42.tar.gz
SkyHanni-9cb056569bc5e55702caaeec59a77e1193716e42.tar.bz2
SkyHanni-9cb056569bc5e55702caaeec59a77e1193716e42.zip
code cleanup
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
index c9bf25047..21c35837c 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
@@ -7,8 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
-import io.github.moulberry.notenoughupdates.util.stripControlCodes
-import net.minecraftforge.event.world.WorldEvent
+import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class GardenCropUpgrades {
@@ -29,7 +28,7 @@ class GardenCropUpgrades {
fun onInventoryOpen(event: InventoryOpenEvent) {
if (event.inventoryName != "Crop Upgrades") return
event.inventoryItems.forEach { (_, item) ->
- val crop = item.name?.stripControlCodes()?.let {
+ val crop = item.name?.removeColor()?.let {
CropType.getByName(it)
} ?: return@forEach
val level = item.getLore().firstNotNullOfOrNull {