diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-15 14:58:33 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-15 14:58:33 +0200 |
commit | 1ae2d5722480c3f6ca8dd7a6c86233245fe30a09 (patch) | |
tree | cfd50b7f2e60bd51fe312c8869a03ba748147e6a /src/main/java | |
parent | 951b4b945c2aec74c79925754039dc4f0091ee51 (diff) | |
download | skyhanni-1ae2d5722480c3f6ca8dd7a6c86233245fe30a09.tar.gz skyhanni-1ae2d5722480c3f6ca8dd7a6c86233245fe30a09.tar.bz2 skyhanni-1ae2d5722480c3f6ca8dd7a6c86233245fe30a09.zip |
code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt | 5 |
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 { |