diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt index 2584b6616406..d4898b401c9c 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.formatLong @@ -41,7 +41,7 @@ object CollectionAPI { // TODO repo private val incorrectCollectionNames = mapOf( - "Mushroom" to "RED_MUSHROOM".asInternalName() + "Mushroom" to "RED_MUSHROOM".toInternalName() ) @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index 4d7662b4f452..71ef74d414e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -18,7 +18,7 @@ import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUCalculator import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.isDouble import at.hannibal2.skyhanni.utils.PrimitiveItemStack import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack @@ -185,7 +185,7 @@ object GetFromSackAPI { val replacedString = itemString.replace("_", " ") val item = when { - SackAPI.sackListInternalNames.contains(itemString) -> itemString.asInternalName() + SackAPI.sackListInternalNames.contains(itemString) -> itemString.toInternalName() SackAPI.sackListNames.contains(replacedString) -> NEUInternalName.fromItemNameOrNull(replacedString) ?: run { ErrorManager.logErrorStateWithData( "Couldn't resolve item name", diff --git a/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt index 4bf8cb3bbece..3042cce3316c 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemCategory import at.hannibal2.skyhanni.utils.ItemUtils.getItemCategoryOrNull -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getDrillUpgrades import at.hannibal2.skyhanni.utils.TimeLimitedCache @@ -21,7 +21,7 @@ object HotmAPI { val activeMiningAbility get() = HotmData.abilities.firstOrNull { it.enabled } - private val blueGoblinEgg = "GOBLIN_OMELETTE_BLUE_CHEESE".asInternalName() + private val blueGoblinEgg = "GOBLIN_OMELETTE_BLUE_CHEESE".toInternalName() private val blueEggCache = TimeLimitedCache(10.0.seconds) val isBlueEggActive diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt index b72c38c7f6d6..3c2f8aa0e21c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.features.inventory.SuperCraftFeatures.craftedPatter import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -28,8 +28,8 @@ object ItemAddManager { COMMAND, } - private val ARCHFIEND_DICE = "ARCHFIEND_DICE".asInternalName() - private val HIGH_CLASS_ARCHFIEND_DICE = "HIGH_CLASS_ARCHFIEND_DICE".asInternalName() + private val ARCHFIEND_DICE = "ARCHFIEND_DICE".toInternalName() + private val HIGH_CLASS_ARCHFIEND_DICE = "HIGH_CLASS_ARCHFIEND_DICE".toInternalName() private val diceRollChatPattern by RepoPattern.pattern( "data.itemmanager.diceroll", diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt index 2f516610ca51..c75c5cfbf2a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemCategoryOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -34,7 +34,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object QuiverAPI { private val storage get() = ProfileStorageData.profileSpecific var currentArrow: ArrowType? - get() = storage?.arrows?.currentArrow?.asInternalName()?.let { getArrowByNameOrNull(it) } ?: NONE_ARROW_TYPE + get() = storage?.arrows?.currentArrow?.toInternalName()?.let { getArrowByNameOrNull(it) } ?: NONE_ARROW_TYPE set(value) { storage?.arrows?.currentArrow = value?.toString() ?: return } @@ -61,7 +61,7 @@ object QuiverAPI { private var hasBow = false const val MAX_ARROW_AMOUNT = 2880 - private val SKELETON_MASTER_CHESTPLATE = "SKELETON_MASTER_CHESTPLATE".asInternalName() + private val SKELETON_MASTER_CHESTPLATE = "SKELETON_MASTER_CHESTPLATE".toInternalName() var NONE_ARROW_TYPE: ArrowType? = null private var FLINT_ARROW_TYPE: ArrowType? = null @@ -290,10 +290,10 @@ object QuiverAPI { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { val arrowData = event.getConstant("ArrowTypes") - arrows = arrowData.arrows.map { ArrowType(it.value.arrow, it.key.asInternalName()) } + arrows = arrowData.arrows.map { ArrowType(it.value.arrow, it.key.toInternalName()) } - NONE_ARROW_TYPE = getArrowByNameOrNull("NONE".asInternalName()) - FLINT_ARROW_TYPE = getArrowByNameOrNull("ARROW".asInternalName()) + NONE_ARROW_TYPE = getArrowByNameOrNull("NONE".toInternalName()) + FLINT_ARROW_TYPE = getArrowByNameOrNull("ARROW".toInternalName()) } class UnknownArrowType(message: String) : Exception(message) diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 4978497cf3e8..8476ffae4213 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.itemNameWithoutColor import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal @@ -139,7 +139,7 @@ object SackAPI { if (gemstoneMap.containsKey(name.removeColor())) { val internalName = "${rarity.uppercase()}_${ name.uppercase().split(" ")[0].removeColor() - }_GEM".asInternalName() + }_GEM".toInternalName() gem.slot = slot @@ -207,7 +207,7 @@ object SackAPI { val filletPerTrophy = FishingAPI.getFilletPerTrophy(stack.getInternalName()) val filletValue = filletPerTrophy * stored item.magmaFish = filletValue - "MAGMA_FISH".asInternalName().sackPrice(filletValue) + "MAGMA_FISH".toInternalName().sackPrice(filletValue) } else { internalName.sackPrice(stored).coerceAtLeast(0) } @@ -378,7 +378,7 @@ object SackAPI { fun testSackAPI(args: Array) { if (args.size == 1) { if (sackListInternalNames.contains(args[0].uppercase())) { - ChatUtils.chat("Sack data for ${args[0]}: ${fetchSackItem(args[0].asInternalName())}") + ChatUtils.chat("Sack data for ${args[0]}: ${fetchSackItem(args[0].toInternalName())}") } else { ChatUtils.userError("That item isn't a valid sack item.") } @@ -398,18 +398,18 @@ data class SackItem( // TODO repo private val gemstoneMap = mapOf( - "Jade Gemstones" to "ROUGH_JADE_GEM".asInternalName(), - "Amber Gemstones" to "ROUGH_AMBER_GEM".asInternalName(), - "Topaz Gemstones" to "ROUGH_TOPAZ_GEM".asInternalName(), - "Sapphire Gemstones" to "ROUGH_SAPPHIRE_GEM".asInternalName(), - "Amethyst Gemstones" to "ROUGH_AMETHYST_GEM".asInternalName(), - "Jasper Gemstones" to "ROUGH_JASPER_GEM".asInternalName(), - "Ruby Gemstones" to "ROUGH_RUBY_GEM".asInternalName(), - "Opal Gemstones" to "ROUGH_OPAL_GEM".asInternalName(), - "Onyx Gemstones" to "ROUGH_ONYX_GEM".asInternalName(), - "Aquamarine Gemstones" to "ROUGH_AQUAMARINE_GEM".asInternalName(), - "Citrine Gemstones" to "ROUGH_CITRINE_GEM".asInternalName(), - "Peridot Gemstones" to "ROUGH_PERIDOT_GEM".asInternalName(), + "Jade Gemstones" to "ROUGH_JADE_GEM".toInternalName(), + "Amber Gemstones" to "ROUGH_AMBER_GEM".toInternalName(), + "Topaz Gemstones" to "ROUGH_TOPAZ_GEM".toInternalName(), + "Sapphire Gemstones" to "ROUGH_SAPPHIRE_GEM".toInternalName(), + "Amethyst Gemstones" to "ROUGH_AMETHYST_GEM".toInternalName(), + "Jasper Gemstones" to "ROUGH_JASPER_GEM".toInternalName(), + "Ruby Gemstones" to "ROUGH_RUBY_GEM".toInternalName(), + "Opal Gemstones" to "ROUGH_OPAL_GEM".toInternalName(), + "Onyx Gemstones" to "ROUGH_ONYX_GEM".toInternalName(), + "Aquamarine Gemstones" to "ROUGH_AQUAMARINE_GEM".toInternalName(), + "Citrine Gemstones" to "ROUGH_CITRINE_GEM".toInternalName(), + "Peridot Gemstones" to "ROUGH_PERIDOT_GEM".toInternalName(), ) // ideally should be correct but using alright should also be fine unless they sold their whole sacks diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/neu/NeuReforgeJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/neu/NeuReforgeJson.kt index bc92dc189f69..b327d9a29a35 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/neu/NeuReforgeJson.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/neu/NeuReforgeJson.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.data.jsonobjects.repo.neu import at.hannibal2.skyhanni.data.model.SkyblockStatList import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import com.google.gson.annotations.Expose import com.google.gson.annotations.SerializedName @@ -53,7 +53,7 @@ data class NeuReforgeJson( is Map<*, *> -> { val type = "SPECIAL_ITEMS" val map = any as? Map> ?: return type to emptyList() - val internalNames = map["internalName"]?.map { it.asInternalName() }.orEmpty() + val internalNames = map["internalName"]?.map { it.toInternalName() }.orEmpty() val itemType = map["itemid"]?.map { NEUItems.getInternalNamesForItemId(Item.getByNameOrId(it)) }?.flatten().orEmpty() diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 24835a458859..784c48ac8c61 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getCachedIngredients import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -162,13 +162,13 @@ object MinionCraftHelper { allIngredients.clear() for (internalId in NEUItems.allNeuRepoItems().keys) { - val internalName = internalId.asInternalName() + val internalName = internalId.toInternalName() if (internalName.endsWith("_GENERATOR_1")) { - if (internalName == "REVENANT_GENERATOR_1".asInternalName() || - internalName == "TARANTULA_GENERATOR_1".asInternalName() || - internalName == "VOIDLING_GENERATOR_1".asInternalName() || - internalName == "INFERNO_GENERATOR_1".asInternalName() || - internalName == "VAMPIRE_GENERATOR_1".asInternalName() + if (internalName == "REVENANT_GENERATOR_1".toInternalName() || + internalName == "TARANTULA_GENERATOR_1".toInternalName() || + internalName == "VOIDLING_GENERATOR_1".toInternalName() || + internalName == "INFERNO_GENERATOR_1".toInternalName() || + internalName == "VAMPIRE_GENERATOR_1".toInternalName() ) continue tierOneMinions.add(internalName) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNode.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNode.kt index bdfb97833e46..cfc6772985ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNode.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNode.kt @@ -1,33 +1,33 @@ package at.hannibal2.skyhanni.features.combat.endernodetracker import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName enum class EnderNode( val internalName: NEUInternalName, val displayName: String, ) { - ENCHANTED_ENDSTONE("ENCHANTED_ENDSTONE".asInternalName(), "§aEnchanted End Stone"), - ENCHANTED_OBSIDIAN("ENCHANTED_OBSIDIAN".asInternalName(), "§aEnchanted Obsidian"), - ENCHANTED_ENDER_PEARL("ENCHANTED_ENDER_PEARL".asInternalName(), "§aEnchanted Ender Pearl"), - GRAND_EXP_BOTTLE("GRAND_EXP_BOTTLE".asInternalName(), "§aGrand Experience Bottle"), - TITANIC_EXP_BOTTLE("TITANIC_EXP_BOTTLE".asInternalName(), "§9Titanic Experience Bottle"), - END_STONE_SHULKER("END_STONE_SHULKER".asInternalName(), "§9End Stone Shulker"), - ENDSTONE_GEODE("ENDSTONE_GEODE".asInternalName(), "§9End Stone Geode"), - MAGIC_RUNE("MAGIC_RUNE;1".asInternalName(), "§d◆ Magical Rune I"), - ENDER_GAUNTLET("ENDER_GAUNTLET".asInternalName(), "§5Ender Gauntlet"), - MITE_GEL("MITE_GEL".asInternalName(), "§5Mite Gel"), - SHRIMP_THE_FISH("SHRIMP_THE_FISH".asInternalName(), "§cShrimp the Fish"), + ENCHANTED_ENDSTONE("ENCHANTED_ENDSTONE".toInternalName(), "§aEnchanted End Stone"), + ENCHANTED_OBSIDIAN("ENCHANTED_OBSIDIAN".toInternalName(), "§aEnchanted Obsidian"), + ENCHANTED_ENDER_PEARL("ENCHANTED_ENDER_PEARL".toInternalName(), "§aEnchanted Ender Pearl"), + GRAND_EXP_BOTTLE("GRAND_EXP_BOTTLE".toInternalName(), "§aGrand Experience Bottle"), + TITANIC_EXP_BOTTLE("TITANIC_EXP_BOTTLE".toInternalName(), "§9Titanic Experience Bottle"), + END_STONE_SHULKER("END_STONE_SHULKER".toInternalName(), "§9End Stone Shulker"), + ENDSTONE_GEODE("ENDSTONE_GEODE".toInternalName(), "§9End Stone Geode"), + MAGIC_RUNE("MAGIC_RUNE;1".toInternalName(), "§d◆ Magical Rune I"), + ENDER_GAUNTLET("ENDER_GAUNTLET".toInternalName(), "§5Ender Gauntlet"), + MITE_GEL("MITE_GEL".toInternalName(), "§5Mite Gel"), + SHRIMP_THE_FISH("SHRIMP_THE_FISH".toInternalName(), "§cShrimp the Fish"), - END_HELMET("END_HELMET".asInternalName(), "§5Ender Helmet"), - END_CHESTPLATE("END_CHESTPLATE".asInternalName(), "§5Ender Chestplate"), - END_LEGGINGS("END_LEGGINGS".asInternalName(), "§5Ender Leggings"), - END_BOOTS("END_BOOTS".asInternalName(), "§5Ender Boots"), - ENDER_NECKLACE("ENDER_NECKLACE".asInternalName(), "§5Ender Necklace"), - COMMON_ENDERMAN_PET("ENDERMAN;0".asInternalName(), "§fEnderman"), - UNCOMMON_ENDERMAN_PET("ENDERMAN;1".asInternalName(), "§aEnderman"), - RARE_ENDERMAN_PET("ENDERMAN;2".asInternalName(), "§9Enderman"), - EPIC_ENDERMAN_PET("ENDERMAN;3".asInternalName(), "§5Enderman"), - LEGENDARY_ENDERMAN_PET("ENDERMAN;4".asInternalName(), "§6Enderman") + END_HELMET("END_HELMET".toInternalName(), "§5Ender Helmet"), + END_CHESTPLATE("END_CHESTPLATE".toInternalName(), "§5Ender Chestplate"), + END_LEGGINGS("END_LEGGINGS".toInternalName(), "§5Ender Leggings"), + END_BOOTS("END_BOOTS".toInternalName(), "§5Ender Boots"), + ENDER_NECKLACE("ENDER_NECKLACE".toInternalName(), "§5Ender Necklace"), + COMMON_ENDERMAN_PET("ENDERMAN;0".toInternalName(), "§fEnderman"), + UNCOMMON_ENDERMAN_PET("ENDERMAN;1".toInternalName(), "§aEnderman"), + RARE_ENDERMAN_PET("ENDERMAN;2".toInternalName(), "§9Enderman"), + EPIC_ENDERMAN_PET("ENDERMAN;3".toInternalName(), "§5Enderman"), + LEGENDARY_ENDERMAN_PET("ENDERMAN;4".toInternalName(), "§6Enderman") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index 28020c006510..65395ff6c009 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -45,7 +45,7 @@ import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble import at.hannibal2.skyhanni.utils.NumberUtil.formatLong @@ -121,9 +121,9 @@ object GhostCounter { private var currentSkill = "" private var currentSkillLevel = -1 private const val CONFIG_VALUE_VERSION = 1 - private val SORROW = "SORROW".asInternalName() - private val PLASMA = "PLASMA".asInternalName() - private val VOLTA = "VOLTA".asInternalName() + private val SORROW = "SORROW".toInternalName() + private val PLASMA = "PLASMA".toInternalName() + private val VOLTA = "VOLTA".toInternalName() @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt index 5db28465e554..bcae24943c72 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.RegexUtils.anyMatches import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -57,7 +57,7 @@ object CroesusChestTracker { private const val BACK_ARROW_SLOT = 45 private const val MAX_CHESTS = 60 - private val kismetInternalName = "KISMET_FEATHER".asInternalName() + private val kismetInternalName = "KISMET_FEATHER".toInternalName() private var inCroesusInventory = false private var croesusEmpty = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt index 284f8424ffe2..201bb4b76311 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacks import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -28,7 +28,7 @@ object DungeonArchitectFeatures { "§4\\[STATUE] Oruo the Omniscient§r§f: (?:§.)*(?\\S*) (?:§.)*chose the wrong .*" ) - private val architectsFirstDraftItem = "ARCHITECT_FIRST_DRAFT".asInternalName() + private val architectsFirstDraftItem = "ARCHITECT_FIRST_DRAFT".toInternalName() @SubscribeEvent fun onChat(event: LorenzChatEvent) { @@ -42,7 +42,7 @@ object DungeonArchitectFeatures { } } - private val architectsFirstDraft = "ARCHITECT_FIRST_DRAFT".asInternalName().makePrimitiveStack() + private val architectsFirstDraft = "ARCHITECT_FIRST_DRAFT".toInternalName().makePrimitiveStack() private fun generateMessage(name: String, event: LorenzChatEvent) { val architectItemAmount = architectsFirstDraftItem.getAmountInSacks() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt index 468c3ecbeaa8..d06c187ee9d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt @@ -10,14 +10,14 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.item.ItemStack @SkyHanniModule object DianaAPI { - private val spade by lazy { "ANCESTRAL_SPADE".asInternalName() } + private val spade by lazy { "ANCESTRAL_SPADE".toInternalName() } fun hasSpadeInHand() = InventoryUtils.itemInHandId == spade diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt index f0338f3e1fb7..c0a0e6311a98 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt @@ -23,7 +23,7 @@ import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.roundTo @@ -531,14 +531,14 @@ object HoppityCollectionStats { val displayName: String, val item: NEUInternalName, ) { - COMMON("§fCommon", "STAINED_GLASS".asInternalName()), - UNCOMMON("§aUncommon", "STAINED_GLASS-5".asInternalName()), - RARE("§9Rare", "STAINED_GLASS-11".asInternalName()), - EPIC("§5Epic", "STAINED_GLASS-10".asInternalName()), - LEGENDARY("§6Legendary", "STAINED_GLASS-1".asInternalName()), - MYTHIC("§dMythic", "STAINED_GLASS-6".asInternalName()), - DIVINE("§bDivine", "STAINED_GLASS-3".asInternalName()), - TOTAL("§cTotal", "STAINED_GLASS-14".asInternalName()), + COMMON("§fCommon", "STAINED_GLASS".toInternalName()), + UNCOMMON("§aUncommon", "STAINED_GLASS-5".toInternalName()), + RARE("§9Rare", "STAINED_GLASS-11".toInternalName()), + EPIC("§5Epic", "STAINED_GLASS-10".toInternalName()), + LEGENDARY("§6Legendary", "STAINED_GLASS-1".toInternalName()), + MYTHIC("§dMythic", "STAINED_GLASS-6".toInternalName()), + DIVINE("§bDivine", "STAINED_GLASS-3".toInternalName()), + TOTAL("§cTotal", "STAINED_GLASS-14".toInternalName()), ; companion object { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt index f1d6419cccbb..2f08c99ad238 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt @@ -39,7 +39,6 @@ import kotlin.time.Duration.Companion.seconds @SkyHanniModule object HoppityEggLocator { private val config get() = HoppityEggsManager.config - val locatorItem = "EGGLOCATOR".toInternalName() private var lastParticlePosition: LorenzVec? = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt index 1dd620a98dc1..fdabf8733132 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.addItemIcon @@ -64,7 +64,7 @@ object JyrreTimer { display = drawDisplay() } - private val displayIcon by lazy { "REFINED_BOTTLE_OF_JYRRE".asInternalName().getItemStack() } + private val displayIcon by lazy { "REFINED_BOTTLE_OF_JYRRE".toInternalName().getItemStack() } fun drawDisplay(): MutableList { duration -= 1.seconds diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index 9af4ca7e4e9d..fcf400410c08 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -96,7 +96,7 @@ object FishingProfitTracker { private val ItemTrackerData.TrackedItem.timesCaught get() = timesGained - private val MAGMA_FISH by lazy { "MAGMA_FISH".asInternalName() } + private val MAGMA_FISH by lazy { "MAGMA_FISH".toInternalName() } private const val NAME_ALL: CategoryName = "All" private var currentCategory: CategoryName = NAME_ALL diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt index ce6352c0ddbe..d504566586c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt @@ -27,7 +27,7 @@ import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -244,9 +244,9 @@ object TrophyFishDisplay { return internalName } } - if (rawName.endsWith("1")) return "OBFUSCATED_FISH_1_BRONZE".asInternalName() - if (rawName.endsWith("2")) return "OBFUSCATED_FISH_2_BRONZE".asInternalName() - if (rawName.endsWith("3")) return "OBFUSCATED_FISH_3_BRONZE".asInternalName() + if (rawName.endsWith("1")) return "OBFUSCATED_FISH_1_BRONZE".toInternalName() + if (rawName.endsWith("2")) return "OBFUSCATED_FISH_2_BRONZE".toInternalName() + if (rawName.endsWith("3")) return "OBFUSCATED_FISH_3_BRONZE".toInternalName() return null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt index c52721bdef63..eac76482f7f2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -31,7 +31,7 @@ object TrophyFishFillet { val multiplier = if (Keyboard.KEY_LSHIFT.isKeyHeld()) event.itemStack.stackSize else 1 val filletValue = info.getFilletValue(rarity) * multiplier // TODO use magma fish member - val filletPrice = filletValue * "MAGMA_FISH".asInternalName().getPrice() + val filletPrice = filletValue * "MAGMA_FISH".toInternalName().getPrice() event.toolTip.add("§7Fillet: §8${filletValue.addSeparators()} Magmafish §7(§6${filletPrice.shortFormat()}§7)") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt index 760df643285a..5c0189b6da8b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt @@ -18,7 +18,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables @@ -128,7 +128,7 @@ object AnitaMedalProfit { } private fun getFullCost(requiredItems: MutableList): Double { - val jacobTicketPrice = "JACOBS_TICKET".asInternalName().getPrice() + val jacobTicketPrice = "JACOBS_TICKET".toInternalName().getPrice() var otherItemsPrice = 0.0 for (rawItemName in requiredItems) { val pair = ItemUtils.readItemAmount(rawItemName) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/CropAccessory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/CropAccessory.kt index c11c2640d72b..7d71281dd36e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/CropAccessory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/CropAccessory.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName enum class CropAccessory( val internalName: NEUInternalName?, @@ -12,17 +12,17 @@ enum class CropAccessory( NONE(null, emptySet(), 0.0, null), CROPIE( - "CROPIE_TALISMAN".asInternalName(), + "CROPIE_TALISMAN".toInternalName(), setOf(CropType.WHEAT, CropType.POTATO, CropType.CARROT), 10.0, Pair("CROPIE", 256) ), SQUASH( - "SQUASH_RING".asInternalName(), + "SQUASH_RING".toInternalName(), setOf(CropType.WHEAT, CropType.POTATO, CropType.CARROT, CropType.COCOA_BEANS, CropType.MELON, CropType.PUMPKIN), 20.0, Pair("SQUASH", 128) ), - FERMENTO("FERMENTO_ARTIFACT".asInternalName(), CropType.entries.toSet(), 30.0, Pair("CONDENSED_FERMENTO", 8)), + FERMENTO("FERMENTO_ARTIFACT".toInternalName(), CropType.entries.toSet(), 30.0, Pair("CONDENSED_FERMENTO", 8)), ; fun getFortune(cropType: CropType): Double { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt index 337f64675b66..d886475c8e83 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -37,7 +37,7 @@ object GardenOptimalSpeed { private var sneakingTime = 0.seconds private val sneaking get() = Minecraft.getMinecraft().thePlayer.isSneaking private val sneakingPersistent get() = sneakingSince.passedSince() > 5.seconds - private val rancherBoots = "RANCHERS_BOOTS".asInternalName() + private val rancherBoots = "RANCHERS_BOOTS".toInternalName() /** * This speed value represents the walking speed, not the speed stat. diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt index 57c3a1977fa3..f7514898954e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems @@ -35,7 +35,7 @@ object ComposterDisplay { private var display = emptyList>() private var composterEmptyTime: Duration? = null - private val bucket by lazy { "BUCKET".asInternalName().getItemStack() } + private val bucket by lazy { "BUCKET".toInternalName().getItemStack() } private var tabListData by ComposterAPI::tabListData enum class DataType(rawPattern: String, val icon: String) { @@ -44,7 +44,7 @@ object ComposterDisplay { TIME_LEFT(" Time Left: §r(.*)", "WATCH"), STORED_COMPOST(" Stored Compost: §r(.*)", "COMPOST"); - val displayItem by lazy { icon.asInternalName().getItemStack() } + val displayItem by lazy { icon.toInternalName().getItemStack() } val pattern by lazy { rawPattern.toPattern() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 06a5dbeaf3a8..33b5dcf4db4f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -33,7 +33,6 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.NONE -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStack @@ -586,14 +585,14 @@ object ComposterOverlay { for ((internalName, _) in NEUItems.allNeuRepoItems()) { if (blockedItems.contains(internalName) || isBlockedArmor(internalName)) continue - var (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName.asInternalName()) + var (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName.toInternalName()) if (amount <= 9) continue if (internalName == "ENCHANTED_HUGE_MUSHROOM_1" || internalName == "ENCHANTED_HUGE_MUSHROOM_2") { // 160 * 8 * 4 is 5120 and not 5184, but hypixel made an error, so we have to copy the error amount = 5184 } baseValues[newId]?.let { - map[internalName.asInternalName()] = it * amount + map[internalName.toInternalName()] = it * amount } } return map 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 f84fde983aca..2223732742b8 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 @@ -29,7 +29,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.itemNameWithoutColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStack @@ -132,8 +131,8 @@ object CropMoneyDisplay { toolHasBountiful?.put(it, reforgeName == "bountiful") if (GardenAPI.mushroomCowPet && it != CropType.MUSHROOM && config.mooshroom) { - val redMushroom = "ENCHANTED_RED_MUSHROOM".asInternalName() - val brownMushroom = "ENCHANTED_BROWN_MUSHROOM".asInternalName() + val redMushroom = "ENCHANTED_RED_MUSHROOM".toInternalName() + val brownMushroom = "ENCHANTED_BROWN_MUSHROOM".toInternalName() val (redPrice, brownPrice) = if (LorenzUtils.noTradeMode) { val redPrice = (redMushroom.getNpcPriceOrNull() ?: 160.0) / 160 val brownPrice = (brownMushroom.getNpcPriceOrNull() ?: 160.0) / 160 @@ -152,8 +151,8 @@ object CropMoneyDisplay { val itemInHand = InventoryUtils.getItemInHand()?.getInternalName() if (itemInHand?.contains("DICER") == true && config.dicer) { val (dicerDrops, internalName) = when (it) { - CropType.MELON -> GardenCropSpeed.latestMelonDicer to "ENCHANTED_MELON".asInternalName() - CropType.PUMPKIN -> GardenCropSpeed.latestPumpkinDicer to "ENCHANTED_PUMPKIN".asInternalName() + CropType.MELON -> GardenCropSpeed.latestMelonDicer to "ENCHANTED_MELON".toInternalName() + CropType.PUMPKIN -> GardenCropSpeed.latestPumpkinDicer to "ENCHANTED_PUMPKIN".toInternalName() else -> ErrorManager.skyHanniError( "Unknown dicer detected.", @@ -171,7 +170,7 @@ object CropMoneyDisplay { if (config.armor) { val amountPerHour = it.multiplier * GardenCropSpeed.getRecentBPS() * ArmorDropTracker.getDropsPerHour(it) - extraArmorCoins = amountPerHour * it.specialDropType.asInternalName().getNpcPrice() + extraArmorCoins = amountPerHour * it.specialDropType.toInternalName().getNpcPrice() } } @@ -421,7 +420,7 @@ object CropMoneyDisplay { if (rawInternalName == "ENCHANTED_PAPER") continue if (rawInternalName == "ENCHANTED_BREAD") continue if (rawInternalName == "SIMPLE_CARROT_CANDY") continue - val internalName = rawInternalName.asInternalName() + val internalName = rawInternalName.toInternalName() if (!internalName.isBazaarItem()) continue val (newId, amount) = NEUItems.getPrimitiveMultiplier(internalName) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrade.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrade.kt index 769253538aaa..0181b8d20f9a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrade.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrade.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden.fortuneguide import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName data class FortuneUpgrade( val description: String, @@ -12,5 +12,5 @@ data class FortuneUpgrade( var cost: Int? = null, var costPerFF: Int? = null, // also the same as time to repay ) { - val requiredItem: NEUInternalName = requiredItemName.asInternalName() + val requiredItem: NEUInternalName = requiredItemName.toInternalName() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt index af4e4b31f45a..dd2beab3a949 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.indexOfFirst import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemPriceUtils.getPrice -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -63,7 +63,7 @@ object AnitaExtraFarmingFortune { // TODO: maybe only show the price when playing classic // if (!LorenzUtils.noTradeMode) { - val price = jacobTickets * "JACOBS_TICKET".asInternalName().getPrice() + val price = jacobTickets * "JACOBS_TICKET".toInternalName().getPrice() event.toolTip.add(index, " §7Price: §6${price.shortFormat()} coins") // } event.toolTip.add(index, "§aJacob Tickets §8x${jacobTickets.addSeparators()}") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt index cf3ae50a4ba8..6fb5518b7a6f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt @@ -28,7 +28,7 @@ import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -57,11 +57,11 @@ object PestAPI { // TODO move into repo val vacuumVariants = listOf( - "SKYMART_VACUUM".asInternalName(), - "SKYMART_TURBO_VACUUM".asInternalName(), - "SKYMART_HYPER_VACUUM".asInternalName(), - "INFINI_VACUUM".asInternalName(), - "INFINI_VACUUM_HOOVERIUS".asInternalName(), + "SKYMART_VACUUM".toInternalName(), + "SKYMART_TURBO_VACUUM".toInternalName(), + "SKYMART_HYPER_VACUUM".toInternalName(), + "INFINI_VACUUM".toInternalName(), + "INFINI_VACUUM_HOOVERIUS".toInternalName(), ) fun hasVacuumInHand() = InventoryUtils.itemInHandId in vacuumVariants diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestType.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestType.kt index 26156fcaae64..3913174b1159 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestType.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.features.combat.damageindicator.BossType import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName enum class PestType( val displayName: String, @@ -18,7 +18,7 @@ enum class PestType( BossType.GARDEN_PEST_BEETLE, SprayType.DUNG, VinylType.NOT_JUST_A_PEST, - "PEST_BEETLE_MONSTER".asInternalName(), + "PEST_BEETLE_MONSTER".toInternalName(), CropType.NETHER_WART, ), CRICKET( @@ -26,7 +26,7 @@ enum class PestType( BossType.GARDEN_PEST_CRICKET, SprayType.HONEY_JAR, VinylType.CRICKET_CHOIR, - "PEST_CRICKET_MONSTER".asInternalName(), + "PEST_CRICKET_MONSTER".toInternalName(), CropType.CARROT, ), EARTHWORM( @@ -34,7 +34,7 @@ enum class PestType( BossType.GARDEN_PEST_EARTHWORM, SprayType.COMPOST, VinylType.EARTHWORM_ENSEMBLE, - "PEST_EARTHWORM_MONSTER".asInternalName(), + "PEST_EARTHWORM_MONSTER".toInternalName(), CropType.MELON, ), FLY( @@ -42,7 +42,7 @@ enum class PestType( BossType.GARDEN_PEST_FLY, SprayType.DUNG, VinylType.PRETTY_FLY, - "PEST_FLY_MONSTER".asInternalName(), + "PEST_FLY_MONSTER".toInternalName(), CropType.WHEAT, ), LOCUST( @@ -50,7 +50,7 @@ enum class PestType( BossType.GARDEN_PEST_LOCUST, SprayType.PLANT_MATTER, VinylType.CICADA_SYMPHONY, - "PEST_LOCUST_MONSTER".asInternalName(), + "PEST_LOCUST_MONSTER".toInternalName(), CropType.POTATO, ), MITE( @@ -58,7 +58,7 @@ enum class PestType( BossType.GARDEN_PEST_MITE, SprayType.TASTY_CHEESE, VinylType.DYNAMITES, - "PEST_MITE_MONSTER".asInternalName(), + "PEST_MITE_MONSTER".toInternalName(), CropType.CACTUS, ), MOSQUITO( @@ -66,7 +66,7 @@ enum class PestType( BossType.GARDEN_PEST_MOSQUITO, SprayType.COMPOST, VinylType.BUZZIN_BEATS, - "PEST_MOSQUITO_MONSTER".asInternalName(), + "PEST_MOSQUITO_MONSTER".toInternalName(), CropType.SUGAR_CANE, ), MOTH( @@ -74,7 +74,7 @@ enum class PestType( BossType.GARDEN_PEST_MOTH, SprayType.HONEY_JAR, VinylType.WINGS_OF_HARMONY, - "PEST_MOTH_MONSTER".asInternalName(), + "PEST_MOTH_MONSTER".toInternalName(), CropType.COCOA_BEANS, ), RAT( @@ -82,7 +82,7 @@ enum class PestType( BossType.GARDEN_PEST_RAT, SprayType.TASTY_CHEESE, VinylType.RODENT_REVOLUTION, - "PEST_RAT_MONSTER".asInternalName(), + "PEST_RAT_MONSTER".toInternalName(), CropType.PUMPKIN, ), SLUG( @@ -90,7 +90,7 @@ enum class PestType( BossType.GARDEN_PEST_SLUG, SprayType.PLANT_MATTER, VinylType.SLOW_AND_GROOVY, - "PEST_SLUG_MONSTER".asInternalName(), + "PEST_SLUG_MONSTER".toInternalName(), CropType.MUSHROOM, ), ; diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 9f0d783d72f3..22b7f16600a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -46,7 +46,7 @@ import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NEUItems.getPrice @@ -110,7 +110,7 @@ object GardenVisitorFeatures { private val logger = LorenzLogger("garden/visitors") private var lastFullPrice = 0.0 - private val greenThumb = "GREEN_THUMB;1".asInternalName() + private val greenThumb = "GREEN_THUMB;1".toInternalName() @SubscribeEvent fun onProfileJoin(event: ProfileJoinEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt index 3820b4bd432e..a32e5de6bd02 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.PrimitiveIngredient.Companion.toPrimitiveItemStacks @@ -31,7 +31,7 @@ object GardenVisitorSupercraft { private var lastSuperCraftMaterial = "" private val superCraftItem by lazy { - val neuItem = "GOLD_PICKAXE".asInternalName().getItemStack() + val neuItem = "GOLD_PICKAXE".toInternalName().getItemStack() ItemUtils.createItemStack( neuItem.item, "§bSuper Craft", diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt index e20102299d17..dd68002c5a58 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorReward.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.config.HasLegacyId import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack enum class VisitorReward( @@ -22,7 +22,7 @@ enum class VisitorReward( COPPER_DYE("DYE_COPPER", "§8Copper Dye"), ; - private val internalName by lazy { rawInternalName.asInternalName() } + private val internalName by lazy { rawInternalName.toInternalName() } val itemStack by lazy { internalName.getItemStack() } // TODO use this instead of hard coded item names once moulconfig no longer calls toString before the neu repo gets loaded // val displayName by lazy { itemStack.nameWithEnchantment ?: internalName.asString() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt index 8b38238adfdb..5a6c6f8c24cb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RegexUtils.firstMatcherWithIndex import at.hannibal2.skyhanni.utils.RegexUtils.indexOfFirstMatch @@ -20,7 +20,7 @@ object BitsPerCookieVisual { private val config get() = SkyHanniMod.feature.misc.bits - private val boosterCookie = "BOOSTER_COOKIE".asInternalName() + private val boosterCookie = "BOOSTER_COOKIE".toInternalName() private val patternGroup = RepoPattern.group("cookie.bits") diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/CarnivalShopHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/CarnivalShopHelper.kt index 51264a860e03..9f1c760b480a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/CarnivalShopHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/CarnivalShopHelper.kt @@ -16,7 +16,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.createItemStack import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt @@ -33,7 +33,7 @@ object CarnivalShopHelper { // Where the informational item stack will be placed in the GUI private const val CUSTOM_STACK_LOCATION = 8 - private val NAME_TAG_ITEM by lazy { "NAME_TAG".asInternalName().getItemStack().item } + private val NAME_TAG_ITEM by lazy { "NAME_TAG".toInternalName().getItemStack().item } private var repoEventShops = mutableListOf() private var currentProgress: EventShopProgress? = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/EssenceShopHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/EssenceShopHelper.kt index 450e013dab46..ccb7d80b51d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/EssenceShopHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/EssenceShopHelper.kt @@ -18,7 +18,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.createItemStack import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.formatInt @@ -37,7 +37,7 @@ object EssenceShopHelper { // Where the informational item stack will be placed in the GUI private const val CUSTOM_STACK_LOCATION = 8 - private val GOLD_NUGGET_ITEM by lazy { "GOLD_NUGGET".asInternalName().getItemStack().item } + private val GOLD_NUGGET_ITEM by lazy { "GOLD_NUGGET".toInternalName().getItemStack().item } private var essenceShops = mutableListOf() private var currentProgress: EssenceShopProgress? = null @@ -177,7 +177,7 @@ object EssenceShopHelper { if (essenceOwned > 0) add("§7Essence Owned: §8${essenceOwned.addSeparators()}") if (essenceNeeded > 0) { add("§7Additional Essence Needed: §8${essenceNeeded.addSeparators()}") - val essenceItem = "ESSENCE_${currentEssenceType.uppercase()}".asInternalName() + val essenceItem = "ESSENCE_${currentEssenceType.uppercase()}".toInternalName() val bzInstantPrice = essenceItem.getPrice(ItemPriceSource.BAZAAR_INSTANT_BUY) val totalInstantPrice = bzInstantPrice * essenceNeeded @@ -210,7 +210,7 @@ object EssenceShopHelper { essenceShopPattern.matchMatcher(event.inventoryName) { currentEssenceType = groupOrNull("essence") ?: return val essenceName = "ESSENCE_${currentEssenceType.uppercase()}" - currentEssenceItem = essenceName.asInternalName() + currentEssenceItem = essenceName.toInternalName() essenceShops.find { it.shopName == essenceName } ?: return processEssenceShopUpgrades(essenceName, event.inventoryItems) processEssenceShopHeader(event) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt index 327e38aabea5..9a4c2e1208d2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrInsert import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getBottleOfJyrreSeconds import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getSecondsHeld import at.hannibal2.skyhanni.utils.TimeUtils.format @@ -18,8 +18,8 @@ import kotlin.time.Duration.Companion.seconds object HeldTimeInLore { private val config get() = SkyHanniMod.feature.inventory - private val jyrreBottle by lazy { "NEW_BOTTLE_OF_JYRRE".asInternalName() } - private val cacaoTruffle by lazy { "DARK_CACAO_TRUFFLE".asInternalName() } + private val jyrreBottle by lazy { "NEW_BOTTLE_OF_JYRRE".toInternalName() } + private val cacaoTruffle by lazy { "DARK_CACAO_TRUFFLE".toInternalName() } @SubscribeEvent fun onTooltip(event: LorenzToolTipEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index 7316b90c4b0c..6d25f67fad66 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -34,7 +34,7 @@ import at.hannibal2.skyhanni.utils.KeyboardManager import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.MultiFilter -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.drawBorder import at.hannibal2.skyhanni.utils.RenderUtils.highlight @@ -74,7 +74,7 @@ object HideNotClickableItems { "SEEDS|CARROT_ITEM|POTATO_ITEM|PUMPKIN_SEEDS|SUGAR_CANE|MELON_SEEDS|CACTUS|INK_SACK-3", ) - private val netherWart by lazy { "NETHER_STALK".asInternalName() } + private val netherWart by lazy { "NETHER_STALK".toInternalName() } @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { @@ -232,7 +232,7 @@ object HideNotClickableItems { // TODO add more special named fossils (hypixel why) val list = listOf( - "HELIX".asInternalName(), + "HELIX".toInternalName(), ) if (internalName in list) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt index 2b298a8031db..2d0e70fb98ff 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.RenderUtils.interpolate @@ -82,8 +82,8 @@ object HighlightBonzoMasks { // This timer is overestimating since mage level affects the cooldown private enum class MaskType(val internalNames: List, val cooldown: Duration) { - BONZO_MASK(listOf("BONZO_MASK".asInternalName(), "STARRED_BONZO_MASK".asInternalName()), 6.minutes), - SPIRIT_MASK(listOf("SPIRIT_MASK".asInternalName(), "STARRED_SPIRIT_MASK".asInternalName()), 30.seconds), + BONZO_MASK(listOf("BONZO_MASK".toInternalName(), "STARRED_BONZO_MASK".toInternalName()), 6.minutes), + SPIRIT_MASK(listOf("SPIRIT_MASK".toInternalName(), "STARRED_SPIRIT_MASK".toInternalName()), 30.seconds), ; fun percentageComplete(timeUntil: Duration): Double { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 97a5a5737320..5a26567e2b8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -41,7 +41,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getItemCategoryOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatLong import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary @@ -127,11 +127,11 @@ object ItemDisplayOverlayFeatures { if (MASTER_STAR_TIER.isSelected()) { when (internalName) { - "FIRST_MASTER_STAR".asInternalName() -> return "1" - "SECOND_MASTER_STAR".asInternalName() -> return "2" - "THIRD_MASTER_STAR".asInternalName() -> return "3" - "FOURTH_MASTER_STAR".asInternalName() -> return "4" - "FIFTH_MASTER_STAR".asInternalName() -> return "5" + "FIRST_MASTER_STAR".toInternalName() -> return "1" + "SECOND_MASTER_STAR".toInternalName() -> return "2" + "THIRD_MASTER_STAR".toInternalName() -> return "3" + "FOURTH_MASTER_STAR".toInternalName() -> return "4" + "FIFTH_MASTER_STAR".toInternalName() -> return "5" } } @@ -153,7 +153,7 @@ object ItemDisplayOverlayFeatures { } } - if (NEW_YEAR_CAKE.isSelected() && internalName == "NEW_YEAR_CAKE".asInternalName()) { + if (NEW_YEAR_CAKE.isSelected() && internalName == "NEW_YEAR_CAKE".toInternalName()) { val year = item.getNewYearCake()?.toString().orEmpty() return "§b$year" } @@ -182,11 +182,11 @@ object ItemDisplayOverlayFeatures { if (KUUDRA_KEY.isSelected() && itemName.contains("Kuudra Key")) { return when (internalName) { - "KUUDRA_TIER_KEY".asInternalName() -> "§a1" - "KUUDRA_HOT_TIER_KEY".asInternalName() -> "§22" - "KUUDRA_BURNING_TIER_KEY".asInternalName() -> "§e3" - "KUUDRA_FIERY_TIER_KEY".asInternalName() -> "§64" - "KUUDRA_INFERNAL_TIER_KEY".asInternalName() -> "§c5" + "KUUDRA_TIER_KEY".toInternalName() -> "§a1" + "KUUDRA_HOT_TIER_KEY".toInternalName() -> "§22" + "KUUDRA_BURNING_TIER_KEY".toInternalName() -> "§e3" + "KUUDRA_FIERY_TIER_KEY".toInternalName() -> "§64" + "KUUDRA_INFERNAL_TIER_KEY".toInternalName() -> "§c5" else -> "§4?" } } @@ -220,13 +220,13 @@ object ItemDisplayOverlayFeatures { } } - if (RANCHERS_BOOTS_SPEED.isSelected() && internalName == "RANCHERS_BOOTS".asInternalName()) { + if (RANCHERS_BOOTS_SPEED.isSelected() && internalName == "RANCHERS_BOOTS".toInternalName()) { item.getRanchersSpeed()?.let { val isUsingBlackCat = PetAPI.isCurrentPet("Black Cat") val helmet = InventoryUtils.getHelmet()?.getInternalName() val hand = InventoryUtils.getItemInHand()?.getInternalName() - val racingHelmet = "RACING_HELMET".asInternalName() - val cactusKnife = "CACTUS_KNIFE".asInternalName() + val racingHelmet = "RACING_HELMET".toInternalName() + val cactusKnife = "CACTUS_KNIFE".toInternalName() val is500 = isUsingBlackCat || helmet == racingHelmet || (GardenAPI.inGarden() && hand == cactusKnife) val effectiveSpeedCap = if (is500) 500 else 400 val text = if (it > 999) "1k" else "$it" @@ -234,7 +234,7 @@ object ItemDisplayOverlayFeatures { } } - if (LARVA_HOOK.isSelected() && internalName == "LARVA_HOOK".asInternalName()) { + if (LARVA_HOOK.isSelected() && internalName == "LARVA_HOOK".toInternalName()) { lore.matchFirst(harvestPattern) { val amount = group("amount").toInt() return when { @@ -272,12 +272,12 @@ object ItemDisplayOverlayFeatures { } } - if (BOTTLE_OF_JYRRE.isSelected() && internalName == "NEW_BOTTLE_OF_JYRRE".asInternalName()) { + if (BOTTLE_OF_JYRRE.isSelected() && internalName == "NEW_BOTTLE_OF_JYRRE".toInternalName()) { val seconds = item.getBottleOfJyrreSeconds() ?: 0 return "§a${(seconds / 3600)}" } - if (DARK_CACAO_TRUFFLE.isSelected() && internalName == "DARK_CACAO_TRUFFLE".asInternalName()) { + if (DARK_CACAO_TRUFFLE.isSelected() && internalName == "DARK_CACAO_TRUFFLE".toInternalName()) { val seconds = item.getSecondsHeld() ?: 0 return "§a${(seconds / 3600)}" } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt index 12b3e9495d63..a8a2bef38b00 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -78,7 +78,7 @@ object ItemPickupLog { } private val config get() = SkyHanniMod.feature.inventory.itemPickupLogConfig - private val coinIcon = "COIN_TALISMAN".asInternalName() + private val coinIcon = "COIN_TALISMAN".toInternalName() private var itemList = mutableMapOf>() private var itemsAddedToInventory = mutableMapOf() @@ -101,7 +101,7 @@ object ItemPickupLog { "ELLE_SUPPLIES", "ELLE_FUEL_CELL", ) - private val bannedItemsConverted = bannedItemsPattern.map { it.toString().asInternalName() } + private val bannedItemsConverted = bannedItemsPattern.map { it.toString().toInternalName() } @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/MinisterInCalendar.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/MinisterInCalendar.kt index 054fed43340e..0557ffd1b7b4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/MinisterInCalendar.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/MinisterInCalendar.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.setLore import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeResets @@ -44,7 +44,7 @@ object MinisterInCalendar { if (!ElectionAPI.calendarGuiPattern.matches(InventoryUtils.openInventoryName())) return val minister = ElectionAPI.currentMinister ?: return - val itemStack = "${minister.name}_MAYOR_MONSTER".asInternalName().getItemStack() + val itemStack = "${minister.name}_MAYOR_MONSTER".toInternalName().getItemStack() val ministerColor = ElectionAPI.mayorNameToColorCode(minister.mayorName) ministerItemStack = changeItem(ministerColor, minister, itemStack) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt index 00e805bea0a8..41a12e13732a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.ItemPriceSource import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -155,7 +155,7 @@ object SackDisplay { ) ) // TODO add cache - addItemStack("MAGMA_FISH".asInternalName()) + addItemStack("MAGMA_FISH".toInternalName()) } if (config.showPrice && price != 0L) addAlignedNumber("§6${format(price)}") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt index 61ae931170aa..ee19d33cea6b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/auctionhouse/AuctionHouseOpenPriceWebsite.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -49,7 +49,7 @@ object AuctionHouseOpenPriceWebsite { } private fun createDisplayItem() = ItemUtils.createItemStack( - "PAPER".asInternalName().getItemStack().item, + "PAPER".toInternalName().getItemStack().item, "§bPrice History", "§8(From SkyHanni)", "", diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt index f5946565b012..2345a61693fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarOpenPriceWebsite.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -22,7 +22,7 @@ object BazaarOpenPriceWebsite { private var lastClick = SimpleTimeMark.farPast() private val item by lazy { - val neuItem = "PAPER".asInternalName().getItemStack() + val neuItem = "PAPER".toInternalName().getItemStack() ItemUtils.createItemStack( neuItem.item, "§bPrice History", diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt index f315bb17dcc3..be4af7d4b563 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TimeUtils.format @@ -25,7 +25,7 @@ object ChickenHeadTimer { private var lastTime = SimpleTimeMark.farPast() private val cooldown = 5.seconds - private val chickenHead = "CHICKEN_HEAD".asInternalName() + private val chickenHead = "CHICKEN_HEAD".toInternalName() @SubscribeEvent fun onTick(event: LorenzTickEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt index df408133a136..a61f382c80fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.extraAttributes import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat @@ -21,7 +21,7 @@ object CrownOfAvariceCounter { private val config get() = SkyHanniMod.feature.inventory.itemAbilities.crownOfAvarice - private val internalName = "CROWN_OF_AVARICE".asInternalName() + private val internalName = "CROWN_OF_AVARICE".toInternalName() private var render: Renderable? = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt index 5923433d1b36..39a5f934cf37 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RenderUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraft.client.Minecraft @@ -26,7 +26,7 @@ import kotlin.time.Duration.Companion.seconds object FireVeilWandParticles { private val config get() = SkyHanniMod.feature.inventory.itemAbilities.fireVeilWands - private val item by lazy { "FIRE_VEIL_WAND".asInternalName() } + private val item by lazy { "FIRE_VEIL_WAND".toInternalName() } private var lastClick = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt index 6bc24f055ada..92e0cefff0f7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.itemabilities.abilitycooldown import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import kotlin.math.floor @@ -83,9 +83,9 @@ enum class ItemAbility( ) { newVariant = true alternateInternalNames.forEach { - internalNames.add(it.asInternalName()) + internalNames.add(it.toInternalName()) } - internalNames.add(name.asInternalName()) + internalNames.add(name.toInternalName()) } fun activate(color: LorenzColor? = null, customCooldown: Int = (cooldownInSeconds * 1000)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index fb15bd703a44..5c16132a90bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -24,7 +24,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.between -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.highlight @@ -56,13 +56,13 @@ object ItemAbilityCooldown { private var items = mapOf>() private var abilityItems = mapOf>() private val recentItemsInHand = InventoryUtils.recentItemsInHand.values - private val WEIRD_TUBA = "WEIRD_TUBA".asInternalName() - private val WEIRDER_TUBA = "WEIRDER_TUBA".asInternalName() - private val VOODOO_DOLL_WILTED = "VOODOO_DOLL_WILTED".asInternalName() - private val WARNING_FLARE = "WARNING_FLARE".asInternalName() - private val ALERT_FLARE = "ALERT_FLARE".asInternalName() - private val SOS_FLARE = "SOS_FLARE".asInternalName() - private val TOTEM_OF_CORRUPTION = "TOTEM_OF_CORRUPTION".asInternalName() + private val WEIRD_TUBA = "WEIRD_TUBA".toInternalName() + private val WEIRDER_TUBA = "WEIRDER_TUBA".toInternalName() + private val VOODOO_DOLL_WILTED = "VOODOO_DOLL_WILTED".toInternalName() + private val WARNING_FLARE = "WARNING_FLARE".toInternalName() + private val ALERT_FLARE = "ALERT_FLARE".toInternalName() + private val SOS_FLARE = "SOS_FLARE".toInternalName() + private val TOTEM_OF_CORRUPTION = "TOTEM_OF_CORRUPTION".toInternalName() @SubscribeEvent @@ -93,8 +93,8 @@ object ItemAbilityCooldown { if (event.pitch == 1f && event.volume == 1f) { val internalName = InventoryUtils.getItemInHand()?.getInternalName() ?: return if (!internalName.equalsOneOf( - "SHADOW_FURY".asInternalName(), - "STARRED_SHADOW_FURY".asInternalName(), + "SHADOW_FURY".toInternalName(), + "STARRED_SHADOW_FURY".toInternalName(), ) ) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt index ae50308e919f..8a86f1a2c167 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.SoundUtils @@ -25,7 +25,7 @@ import kotlin.time.Duration.Companion.seconds @SkyHanniModule object MiningNotifications { - private val ASCENSION_ROPE by lazy { "ASCENSION_ROPE".asInternalName().makePrimitiveStack(1) } + private val ASCENSION_ROPE by lazy { "ASCENSION_ROPE".toInternalName().makePrimitiveStack(1) } enum class MiningNotificationList(val str: String, val notification: String) { MINESHAFT_SPAWN("§bGlacite Mineshaft", "§bMineshaft"), diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/OreType.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/OreType.kt index 382ed0e297c5..1c4baa432001 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/OreType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/OreType.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.mining import at.hannibal2.skyhanni.data.MiningAPI import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import net.minecraft.block.state.IBlockState enum class OreType( @@ -189,7 +189,7 @@ enum class OreType( val oreBlocks = oreBlocks.toSet() - val internalName: NEUInternalName = internalName.asInternalName() + val internalName: NEUInternalName = internalName.toInternalName() fun isGemstone(): Boolean = this in gemstones diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt index 564db2cc0c2a..db6df8c931d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt @@ -38,7 +38,7 @@ import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzColor.Companion.toLorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.anyMatches import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -154,7 +154,7 @@ object TunnelsMaps { private var clickTranslate = mapOf() - private val ROYAL_PIGEON by lazy { "ROYAL_PIGEON".asInternalName() } + private val ROYAL_PIGEON by lazy { "ROYAL_PIGEON".toInternalName() } private var isCommission = false @@ -370,7 +370,7 @@ object TunnelsMaps { (it.key.getFirstColorCode()?.let { "§$it" }.orEmpty()) + ( "ROUGH_".plus( it.key.removeColor().removeSuffix("stone"), - ).asInternalName().itemName.takeWhile { it != ' ' }.removeColor() + ).toInternalName().itemName.takeWhile { it != ' ' }.removeColor() ), horizontalAlign = RenderUtils.HorizontalAlignment.CENTER, ), diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventDisplay.kt index edc67aa1e5b4..dc7e080d7af2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventDisplay.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark @@ -75,11 +75,11 @@ object MiningEventDisplay { private fun getIslandIcon(islandType: IslandType) = listOf( when (islandType) { IslandType.DWARVEN_MINES -> Renderable.itemStack( - "MITHRIL_ORE".asInternalName().getItemStack(), + "MITHRIL_ORE".toInternalName().getItemStack(), ) IslandType.CRYSTAL_HOLLOWS -> Renderable.itemStack( - "PERFECT_RUBY_GEM".asInternalName().getItemStack(), + "PERFECT_RUBY_GEM".toInternalName().getItemStack(), ) else -> unknownDisplay diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt index 9b7e39b6133e..530da39d6f7c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor @@ -50,7 +50,7 @@ object FossilExcavatorAPI { var inInventory = false var inExcavatorMenu = false - val scrapItem = "SUSPICIOUS_SCRAP".asInternalName() + val scrapItem = "SUSPICIOUS_SCRAP".toInternalName() @SubscribeEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseType.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseType.kt index 42567d5f3363..6e9a80220d4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseType.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.mining.glacitemineshaft -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName enum class CorpseType(val displayName: String, private val keyName: String? = null) { LAPIS("§9Lapis"), @@ -9,7 +9,7 @@ enum class CorpseType(val displayName: String, private val keyName: String? = nu VANGUARD("§fVanguard", "SKELETON_KEY"), ; - val key by lazy { keyName?.asInternalName() } + val key by lazy { keyName?.toInternalName() } override fun toString(): String = displayName } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypointType.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypointType.kt index 31d7a42ce128..feb4b2473967 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypointType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypointType.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.mining.glacitemineshaft import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName enum class MineshaftWaypointType( val displayText: String, @@ -18,7 +18,7 @@ enum class MineshaftWaypointType( ; val helmet by lazy { - itemName?.asInternalName() + itemName?.toInternalName() } companion object { diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt index 67d54f10be94..f756b8ac8125 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt @@ -16,7 +16,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.PrimitiveItemStack import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -187,7 +187,7 @@ object MinionXp { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { xpInfoMap = event.getConstant("MinionXP").minionXp.mapNotNull { xpType -> - xpType.value.mapNotNull { it.key.asInternalName() to XpInfo(SkillType.getByName(xpType.key), it.value) } + xpType.value.mapNotNull { it.key.toInternalName() to XpInfo(SkillType.getByName(xpType.key), it.value) } }.flatten().toMap() } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt index 948ae70e07ae..a05d9a695082 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -168,8 +168,8 @@ object CollectionTracker { } private fun countCurrentlyInInventory(): Int { - val cactus = "CACTUS".asInternalName() - val cactusGreen = "INK_SACK-2".asInternalName() + val cactus = "CACTUS".toInternalName() + val cactusGreen = "INK_SACK-2".toInternalName() return InventoryUtils.countItemsInLowerInventory { if (internalName == cactus && it.getInternalName() == cactusGreen) { return@countItemsInLowerInventory true diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/DraconicSacrificeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/DraconicSacrificeTracker.kt index 61fff44ff7d2..073872edefb8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/DraconicSacrificeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/DraconicSacrificeTracker.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -59,7 +59,7 @@ object DraconicSacrificeTracker { } private val altarArea = AxisAlignedBB(-601.0, 4.0, -282.0, -586.0, 15.0, -269.0) - private val ESSENCE_DRAGON = "ESSENCE_DRAGON".asInternalName() + private val ESSENCE_DRAGON = "ESSENCE_DRAGON".toInternalName() class Data : ItemTrackerData() { override fun resetItems() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt index 412a07aeac91..85fc5f7cf753 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FixNEUHeavyPearls.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.ItemAddEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import io.github.moulberry.notenoughupdates.NotEnoughUpdates import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.hours @@ -14,7 +14,7 @@ import kotlin.time.Duration.Companion.hours object FixNEUHeavyPearls { private val config get() = SkyHanniMod.feature.misc - private val heavyPearl = "HEAVY_PEARL".asInternalName() + private val heavyPearl = "HEAVY_PEARL".toInternalName() @SubscribeEvent fun onItemAdd(event: ItemAddEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt index 159383d8a6ac..8da7d4e6ba27 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.api.GetFromSackAPI import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatchers import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -14,7 +14,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object GFSPiggyBank { - private val ENCHANTED_PORK by lazy { "ENCHANTED_PORK".asInternalName().makePrimitiveStack(8) } + private val ENCHANTED_PORK by lazy { "ENCHANTED_PORK".toInternalName().makePrimitiveStack(8) } private val group = RepoPattern.group("misc.piggybank") diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MagicalPowerDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MagicalPowerDisplay.kt index dedfe3473e90..6802bb7589ca 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/MagicalPowerDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MagicalPowerDisplay.kt @@ -15,7 +15,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor @@ -32,8 +32,8 @@ object MagicalPowerDisplay { ProfileStorageData.profileSpecific?.abiphoneContactAmount = value } - private val hegemonyArtifact = "HEGEMONY_ARTIFACT".asInternalName() - private val riftPrism = "RIFT_PRISM".asInternalName() + private val hegemonyArtifact = "HEGEMONY_ARTIFACT".toInternalName() + private val riftPrism = "RIFT_PRISM".toInternalName() /** * REGEX-TEST: Accessory Bag diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt index 3771771f73f3..3576b5ccb28a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.RegexUtils.anyMatches import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getRecipientName import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -16,7 +16,7 @@ object RestorePieceOfWizardPortalLore { private val config get() = SkyHanniMod.feature.misc - private val item by lazy { "WIZARD_PORTAL_MEMENTO".asInternalName() } + private val item by lazy { "WIZARD_PORTAL_MEMENTO".toInternalName() } private val earnedPattern by RepoPattern.pattern( "misc.restore.wizard.portal.earned", diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt index f9b193d40215..4435e0473020 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt @@ -14,7 +14,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.roundTo @@ -37,19 +37,19 @@ object UserLuckBreakdown { private val config get() = SkyHanniMod.feature.misc private lateinit var mainLuckItem: ItemStack - private val mainLuckID = "ENDER_PEARL".asInternalName() + private val mainLuckID = "ENDER_PEARL".toInternalName() private const val MAIN_LUCK_NAME = "§a✴ SkyHanni User Luck" private lateinit var fillerItem: ItemStack - private var fillerID = "STAINED_GLASS_PANE".asInternalName() + private var fillerID = "STAINED_GLASS_PANE".toInternalName() private const val FILLER_NAME = " " private lateinit var limboItem: ItemStack - private var limboID = "ENDER_PEARL".asInternalName() + private var limboID = "ENDER_PEARL".toInternalName() private const val LIMBO_NAME = "§a✴ Limbo Personal Best" private lateinit var skillsItem: ItemStack - private var skillsID = "DIAMOND_SWORD".asInternalName() + private var skillsID = "DIAMOND_SWORD".toInternalName() private const val SKILLS_NAME = "§a✴ Category: Skills" private var showAllStats = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 1abe1fa09185..a5d50821c243 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -25,7 +25,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull @@ -120,14 +120,14 @@ object EstimatedItemValueCalculator { ::addEnchantments, ) - val farmingForDummies = "FARMING_FOR_DUMMIES".asInternalName() - val etherwarpConduit = "ETHERWARP_CONDUIT".asInternalName() - val etherwarpMerger = "ETHERWARP_MERGER".asInternalName() - val fumingPotatoBook = "FUMING_POTATO_BOOK".asInternalName() - val hotPotatoBook = "HOT_POTATO_BOOK".asInternalName() - val silex = "SIL_EX".asInternalName() - val transmissionTuner = "TRANSMISSION_TUNER".asInternalName() - val manaDisintegrator = "MANA_DISINTEGRATOR".asInternalName() + val farmingForDummies = "FARMING_FOR_DUMMIES".toInternalName() + val etherwarpConduit = "ETHERWARP_CONDUIT".toInternalName() + val etherwarpMerger = "ETHERWARP_MERGER".toInternalName() + val fumingPotatoBook = "FUMING_POTATO_BOOK".toInternalName() + val hotPotatoBook = "HOT_POTATO_BOOK".toInternalName() + val silex = "SIL_EX".toInternalName() + val transmissionTuner = "TRANSMISSION_TUNER".toInternalName() + val manaDisintegrator = "MANA_DISINTEGRATOR".toInternalName() val kuudraUpgradeTiers = listOf("HOT_", "BURNING_", "FIERY_", "INFERNAL_") @@ -154,7 +154,7 @@ object EstimatedItemValueCalculator { val basePrice = internalName.getPriceOrNull() ?: 0.0 var subTotal = 0.0 val combo = ("$internalNameString+ATTRIBUTE_${attributes[0].first}+ATTRIBUTE_${attributes[1].first}") - val comboPrice = combo.asInternalName().getPriceOrNull() + val comboPrice = combo.toInternalName().getPriceOrNull() if (comboPrice != null) { val useless = isUselessAttribute(combo) @@ -212,7 +212,7 @@ object EstimatedItemValueCalculator { private fun getPriceOrCompositePriceForAttribute(attributeName: String, level: Int): Double? { val intRange = if (config.useAttributeComposite.get()) 1..10 else level..level return intRange.mapNotNull { lowerLevel -> - "$attributeName;$lowerLevel".asInternalName().getPriceOrNull()?.let { + "$attributeName;$lowerLevel".toInternalName().getPriceOrNull()?.let { it / (1 shl lowerLevel) * (1 shl level).toDouble() } }.minOrNull() @@ -281,7 +281,7 @@ object EstimatedItemValueCalculator { private fun addRecombobulator(stack: ItemStack, list: MutableList): Double { if (!stack.isRecombobulated()) return 0.0 - val price = "RECOMBOBULATOR_3000".asInternalName().getPrice() + val price = "RECOMBOBULATOR_3000".toInternalName().getPrice() list.add("§7Recombobulated: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -289,7 +289,7 @@ object EstimatedItemValueCalculator { private fun addJalapenoBook(stack: ItemStack, list: MutableList): Double { if (!stack.hasJalapenoBook()) return 0.0 - val price = "JALAPENO_BOOK".asInternalName().getPrice() + val price = "JALAPENO_BOOK".toInternalName().getPrice() list.add("§7Jalapeno Book: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -305,7 +305,7 @@ object EstimatedItemValueCalculator { private fun addWoodSingularity(stack: ItemStack, list: MutableList): Double { if (!stack.hasWoodSingularity()) return 0.0 - val price = "WOOD_SINGULARITY".asInternalName().getPrice() + val price = "WOOD_SINGULARITY".toInternalName().getPrice() list.add("§7Wood Singularity: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -313,7 +313,7 @@ object EstimatedItemValueCalculator { private fun addDivanPowderCoating(stack: ItemStack, list: MutableList): Double { if (!stack.hasDivanPowderCoating()) return 0.0 - val price = "DIVAN_POWDER_COATING".asInternalName().getPrice() + val price = "DIVAN_POWDER_COATING".toInternalName().getPrice() list.add("§7Divan Powder Coating: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -321,7 +321,7 @@ object EstimatedItemValueCalculator { private fun addArtOfWar(stack: ItemStack, list: MutableList): Double { if (!stack.hasArtOfWar()) return 0.0 - val price = "THE_ART_OF_WAR".asInternalName().getPrice() + val price = "THE_ART_OF_WAR".toInternalName().getPrice() list.add("§7The Art of War: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -329,7 +329,7 @@ object EstimatedItemValueCalculator { private fun addStatsBook(stack: ItemStack, list: MutableList): Double { if (!stack.hasBookOfStats()) return 0.0 - val price = "BOOK_OF_STATS".asInternalName().getPrice() + val price = "BOOK_OF_STATS".toInternalName().getPrice() list.add("§7Book of Stats: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -338,7 +338,7 @@ object EstimatedItemValueCalculator { private fun addArtOfPeace(stack: ItemStack, list: MutableList): Double { if (!stack.hasArtOfPeace()) return 0.0 - val price = "THE_ART_OF_PEACE".asInternalName().getPrice() + val price = "THE_ART_OF_PEACE".toInternalName().getPrice() list.add("§7The Art Of Peace: §a§l✔ §7(§6" + price.shortFormat() + "§7)") return price } @@ -382,7 +382,7 @@ object EstimatedItemValueCalculator { private fun addPolarvoidBook(stack: ItemStack, list: MutableList): Double { val count = stack.getPolarvoidBookCount() ?: return 0.0 - val polarvoidBook = "POLARVOID_BOOK".asInternalName() + val polarvoidBook = "POLARVOID_BOOK".toInternalName() val price = polarvoidBook.getPrice() * count list.add("§7Polarvoid: §e$count§7/§e5 §7(§6" + price.shortFormat() + "§7)") return price @@ -391,7 +391,7 @@ object EstimatedItemValueCalculator { private fun addPocketSackInASack(stack: ItemStack, list: MutableList): Double { val count = stack.getAppliedPocketSackInASack() ?: return 0.0 - val pocketSackInASack = "POCKET_SACK_IN_A_SACK".asInternalName() + val pocketSackInASack = "POCKET_SACK_IN_A_SACK".toInternalName() val price = pocketSackInASack.getPrice() * count list.add("§7Pocket Sack-in-a-Sack: §e$count§7/§e3 §7(§6" + price.shortFormat() + "§7)") return price @@ -400,7 +400,7 @@ object EstimatedItemValueCalculator { private fun addBookwormBook(stack: ItemStack, list: MutableList): Double { val count = stack.getBookwormBookCount() ?: return 0.0 - val bookwormBook = "BOOKWORM_BOOK".asInternalName() + val bookwormBook = "BOOKWORM_BOOK".toInternalName() val price = bookwormBook.getPrice() * count list.add("§7Bookworm's Favorite Book: §e$count§7/§e5 §7(§6" + price.shortFormat() + "§7)") return price @@ -410,7 +410,7 @@ object EstimatedItemValueCalculator { val tier = stack.getSilexCount() ?: return 0.0 val internalName = stack.getInternalName() - val maxTier = if (internalName == "STONK_PICKAXE".asInternalName()) 4 else 5 + val maxTier = if (internalName == "STONK_PICKAXE".toInternalName()) 4 else 5 val price = silex.getPrice() * tier list.add("§7Silex: §e$tier§7/§e$maxTier §7(§6" + price.shortFormat() + "§7)") @@ -448,7 +448,7 @@ object EstimatedItemValueCalculator { var totalPrice = 0.0 val map = mutableMapOf() price.essencePrice.let { - val essenceName = "ESSENCE_${it.essenceType}".asInternalName() + val essenceName = "ESSENCE_${it.essenceType}".toInternalName() val amount = it.essenceAmount val essencePrice = essenceName.getPrice() * amount map[" §8${amount.addSeparators()}x ${essenceName.itemName} §7(§6${essencePrice.shortFormat()}§7)"] = essencePrice @@ -567,7 +567,7 @@ object EstimatedItemValueCalculator { for ((prefix, number) in stars) { if (masterStars >= number) { - price += "${prefix}_MASTER_STAR".asInternalName().getPrice() + price += "${prefix}_MASTER_STAR".toInternalName().getPrice() } } @@ -635,7 +635,7 @@ object EstimatedItemValueCalculator { private fun addEnrichment(stack: ItemStack, list: MutableList): Double { val enrichmentName = stack.getEnrichment() ?: return 0.0 - val internalName = "TALISMAN_ENRICHMENT_$enrichmentName".asInternalName() + val internalName = "TALISMAN_ENRICHMENT_$enrichmentName".toInternalName() val price = internalName.getPrice() val name = internalName.itemName @@ -712,19 +712,19 @@ object EstimatedItemValueCalculator { // TODO repo private val hasAlwaysScavenger = listOf( - "CRYPT_DREADLORD_SWORD".asInternalName(), - "ZOMBIE_SOLDIER_CUTLASS".asInternalName(), - "CONJURING_SWORD".asInternalName(), - "EARTH_SHARD".asInternalName(), - "ZOMBIE_KNIGHT_SWORD".asInternalName(), - "SILENT_DEATH".asInternalName(), - "ZOMBIE_COMMANDER_WHIP".asInternalName(), - "ICE_SPRAY_WAND".asInternalName(), + "CRYPT_DREADLORD_SWORD".toInternalName(), + "ZOMBIE_SOLDIER_CUTLASS".toInternalName(), + "CONJURING_SWORD".toInternalName(), + "EARTH_SHARD".toInternalName(), + "ZOMBIE_KNIGHT_SWORD".toInternalName(), + "SILENT_DEATH".toInternalName(), + "ZOMBIE_COMMANDER_WHIP".toInternalName(), + "ICE_SPRAY_WAND".toInternalName(), ) private val hasAlwaysReplenish = listOf( - "ADVANCED_GARDENING_HOE".asInternalName(), - "ADVANCED_GARDENING_AXE".asInternalName(), + "ADVANCED_GARDENING_HOE".toInternalName(), + "ADVANCED_GARDENING_AXE".toInternalName(), ) private fun addEnchantments(stack: ItemStack, list: MutableList): Double { @@ -781,7 +781,7 @@ object EstimatedItemValueCalculator { } if (rawName in tieredEnchants) level = 1 - val enchantmentName = "$rawName;$level".uppercase().asInternalName() + val enchantmentName = "$rawName;$level".uppercase().toInternalName() val itemStack = enchantmentName.getItemStackOrNull() ?: continue val singlePrice = enchantmentName.getPriceOrNull() ?: continue diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt index 443f5c80b2ff..a3fc5cc7ee77 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.roundTo @@ -42,7 +42,7 @@ object LimboPlaytime { private val storage get() = ProfileStorageData.playerSpecific?.limbo private val enabled get() = SkyHanniMod.feature.misc.showLimboTimeInPlaytimeDetailed - private val itemID = "ENDER_PEARL".asInternalName() + private val itemID = "ENDER_PEARL".toInternalName() private const val ITEM_NAME = "§aLimbo" private lateinit var limboItem: ItemStack private var lastCreateCooldown = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt index eb4962549f70..bb852204d288 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatchers import at.hannibal2.skyhanni.utils.SimpleTimeMark @@ -54,7 +54,7 @@ object PabloHelper { DelayedRun.runNextTick { GetFromSackAPI.getFromChatMessageSackItems( - itemName.asInternalName().makePrimitiveStack(), + itemName.toInternalName().makePrimitiveStack(), "Click here to grab an $itemName from sacks!", ) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt index 7701fbebc22d..00405c9ff5bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import net.minecraft.item.ItemStack @SkyHanniModule @@ -23,9 +23,9 @@ object RiftAPI { // internal name -> motes var motesPrice = emptyMap() - val farmingTool by lazy { "FARMING_WAND".asInternalName() } + val farmingTool by lazy { "FARMING_WAND".toInternalName() } - private val blowgun by lazy { "BERBERIS_BLOWGUN".asInternalName() } + private val blowgun by lazy { "BERBERIS_BLOWGUN".toInternalName() } val ItemStack?.isBlowgun: Boolean get() = this?.getInternalName() == blowgun diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt index 538d97230f9f..db42588b8481 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.SkullTextureHolder import at.hannibal2.skyhanni.utils.TimeLimitedSet import net.minecraft.entity.EntityLivingBase @@ -60,7 +60,7 @@ object VerminHighlighter { else -> false } - private fun hasItemInHand() = InventoryUtils.itemInHandId == "TURBOMAX_VACUUM".asInternalName() + private fun hasItemInHand() = InventoryUtils.itemInHandId == "TURBOMAX_VACUUM".toInternalName() fun isEnabled() = RiftAPI.inRift() && RiftAPI.inWestVillage() && config.enabled && hasItemInHand() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt index 53911e88bb66..3d1f4b74f374 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -51,7 +51,7 @@ object VerminTracker { ) private var hasVacuum = false - private val TURBOMAX_VACUUM = "TURBOMAX_VACUUM".asInternalName() + private val TURBOMAX_VACUUM = "TURBOMAX_VACUUM".toInternalName() private val config get() = RiftAPI.config.area.westVillage.verminTracker diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt index 65cbbc53fc9b..3f79838d8208 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils.getEntities import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.SkullTextureHolder import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -22,7 +22,7 @@ object RiftOdonata { private var hasBottleInHand = false private val ODONATA_SKULL_TEXTURE by lazy { SkullTextureHolder.getTexture("MOB_ODONATA") } - private val emptyBottle by lazy { "EMPTY_ODONATA_BOTTLE".asInternalName() } + private val emptyBottle by lazy { "EMPTY_ODONATA_BOTTLE".toInternalName() } @SubscribeEvent fun onTick(event: LorenzTickEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt index 24b254736e73..c175e8749609 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzVec -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled @@ -43,7 +43,7 @@ object EnigmaSoulWaypoints { private var adding = true private val item by lazy { - val neuItem = "SKYBLOCK_ENIGMA_SOUL".asInternalName().getItemStack() + val neuItem = "SKYBLOCK_ENIGMA_SOUL".toInternalName().getItemStack() ItemUtils.createItemStack( neuItem.item, "§5Toggle Missing", diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt index a4068438f056..9260ccab6ede 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt @@ -23,7 +23,7 @@ import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.EntityUtils.isNPC import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -75,7 +75,7 @@ object PunchcardHighlight { private val playerList: MutableSet = mutableSetOf() private var playerQueue = mutableListOf() - private val displayIcon by lazy { "PUNCHCARD_ARTIFACT".asInternalName().getItemStack() } + private val displayIcon by lazy { "PUNCHCARD_ARTIFACT".toInternalName().getItemStack() } private var display: Renderable = Renderable.string("hello") @SubscribeEvent @@ -120,7 +120,7 @@ object PunchcardHighlight { private fun checkPunchcard() { if (!RiftAPI.inRift()) return - val hasPunchcard = InventoryUtils.isItemInInventory("PUNCHCARD_ARTIFACT".asInternalName()) + val hasPunchcard = InventoryUtils.isItemInInventory("PUNCHCARD_ARTIFACT".toInternalName()) if (!hasPunchcard && warningCooldown.passedSince() > 30.seconds) { warningCooldown = SimpleTimeMark.now() ChatUtils.chat("You don't seem to own a Punchcard Artifact, this feature will not work without one.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt index ecfc439230a5..61f76a68dc0d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt @@ -16,7 +16,7 @@ import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.getLorenzVec @@ -31,8 +31,8 @@ object SlayerQuestWarning { private val config get() = SkyHanniMod.feature.slayer private var lastWeaponUse = SimpleTimeMark.farPast() - private val voidItem = "ASPECT_OF_THE_VOID".asInternalName() - private val endItem = "ASPECT_OF_THE_END".asInternalName() + private val voidItem = "ASPECT_OF_THE_VOID".toInternalName() + private val endItem = "ASPECT_OF_THE_END".toInternalName() private val outsideRiftData = SlayerData() private val insideRiftData = SlayerData() diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index 4a19357f1377..2eae36ed526d 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -40,7 +40,7 @@ import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull @@ -386,7 +386,7 @@ object SkyHanniDebugsAndTests { return@buildList } - input.asInternalName().getItemStackOrNull()?.let { item -> + input.toInternalName().getItemStackOrNull()?.let { item -> val itemName = item.itemName val internalName = item.getInternalName() add("§einternal name: §7${internalName.asString()}") diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EssenceItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EssenceItemUtils.kt index 484656770e81..ab97c2e3d8c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EssenceItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EssenceItemUtils.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule @@ -35,7 +35,7 @@ object EssenceItemUtils { upgradePrices[tier] = EssenceUpgradePrice(essencePrice, coinPrice, itemPrice) } - val internalName = name.asInternalName() + val internalName = name.toInternalName() itemPrices[internalName] = upgradePrices } return itemPrices @@ -65,7 +65,7 @@ object EssenceItemUtils { } private fun split(string: String): Pair = string.split(":").let { - it[0].asInternalName() to it[1].toLong() + it[0].toInternalName() to it[1].toLong() } private fun loadEssencePrices(data: NeuEssenceCostJson): MutableMap { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/HypixelCommands.kt b/src/main/java/at/hannibal2/skyhanni/utils/HypixelCommands.kt index 357bea67fb0d..8b1acbfb016b 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/HypixelCommands.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/HypixelCommands.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.api.GetFromSackAPI -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName object HypixelCommands { fun skyblock() { @@ -61,7 +61,7 @@ object HypixelCommands { } fun getFromSacks(itemName: String, amount: Int) { - GetFromSackAPI.getFromSack(itemName.asInternalName(), amount) + GetFromSackAPI.getFromSack(itemName.toInternalName(), amount) } fun widget() { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt index d3c9a8e15ec1..4c1d94727c8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemNameResolver.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.utils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary @@ -51,20 +51,20 @@ object ItemNameResolver { } } ${split.joinToString("_").allLettersFirstUppercase()}" ItemResolutionQuery.findInternalNameByDisplayName(gemstoneQuery, true)?.let { - return itemNameCache.getOrPut(lowercase) { it.asInternalName() } + return itemNameCache.getOrPut(lowercase) { it.toInternalName() } } } } val internalName = when (itemName) { - "SUPERBOOM TNT" -> "SUPERBOOM_TNT".asInternalName() + "SUPERBOOM TNT" -> "SUPERBOOM_TNT".toInternalName() else -> { ItemResolutionQuery.findInternalNameByDisplayName(itemName, true)?.let { // This fixes a NEU bug with §9Hay Bale (cosmetic item) // TODO remove workaround when this is fixed in neu val rawInternalName = if (it == "HAY_BALE") "HAY_BLOCK" else it - rawInternalName.asInternalName() + rawInternalName.toInternalName() } ?: return null } } @@ -119,10 +119,10 @@ object ItemNameResolver { fun fixEnchantmentName(originalName: String): NEUInternalName { duplexPattern.matchMatcher(originalName) { val tier = group("tier") - return "ULTIMATE_REITERATE;$tier".asInternalName() + return "ULTIMATE_REITERATE;$tier".toInternalName() } // TODO USE SH-REPO - return originalName.asInternalName() + return originalName.toInternalName() } private fun getInternalNameOrNullIgnoreCase(itemName: String): NEUInternalName? { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt index 6e43f6da5d85..d8b9cbd6cbf0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt @@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarDataHolder import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getRecipePrice import at.hannibal2.skyhanni.utils.ItemUtils.itemName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getRecipes @@ -42,7 +41,7 @@ object ItemPriceUtils { } if (this == JACK_O_LANTERN) { - return "PUMPKIN".asInternalName().getPrice(priceSource) + 1 + return "PUMPKIN".toInternalName().getPrice(priceSource) + 1 } } if (this == GOLDEN_CARROT) { @@ -119,7 +118,7 @@ object ItemPriceUtils { return if (name.isEmpty()) { InventoryUtils.getItemInHand()?.getInternalName() } else { - val internalName = name.asInternalName() + val internalName = name.toInternalName() if (internalName.getItemStackOrNull() != null) { internalName } else { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 2e7f23812ed7..80720c376dfe 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.PrimitiveIngredient.Companion.toPrimitiveItemStacks import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack @@ -85,7 +84,7 @@ object NEUItems { // because builder blocks can have the same display name as normal items. if (rawInternalName.startsWith("BUILDER_")) continue - val internalName = rawInternalName.asInternalName() + val internalName = rawInternalName.toInternalName() // TODO remove all except one of them once neu is consistent name = name.removePrefix("§f§f§7[lvl 1➡100] ") @@ -110,7 +109,7 @@ object NEUItems { .resolveInternalName() fun getInternalNameOrNull(nbt: NBTTagCompound): NEUInternalName? = - ItemResolutionQuery(manager).withItemNBT(nbt).resolveInternalName()?.asInternalName() + ItemResolutionQuery(manager).withItemNBT(nbt).resolveInternalName()?.toInternalName() // TODO check if getItemId is necessary here. getItemStackOrNull should already return null if invalid fun getInternalNameFromHypixelIdOrNull(hypixelId: String): NEUInternalName? { @@ -136,7 +135,7 @@ object NEUItems { fun NEUInternalName.getNpcPriceOrNull(): Double? = getNpcPriceOrNullNew() fun transHypixelNameToInternalName(hypixelId: String): NEUInternalName = - manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).asInternalName() + manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).toInternalName() @Deprecated("Moved to ItemPriceUtils", ReplaceWith("")) fun NEUInternalName.getPriceOrNull( @@ -152,7 +151,7 @@ object NEUItems { .withKnownInternalName(asString()) .resolveToItemStack()?.copy() - fun getItemStackOrNull(internalName: String) = internalName.asInternalName().getItemStackOrNull() + fun getItemStackOrNull(internalName: String) = internalName.toInternalName().getItemStackOrNull() fun NEUInternalName.getItemStack(): ItemStack = getItemStackOrNull() ?: run { @@ -172,7 +171,7 @@ object NEUItems { if (prefix.isEmpty()) return this val string = asString() if (!string.startsWith(prefix)) return this - return string.substring(prefix.length).asInternalName() + return string.substring(prefix.length).toInternalName() } const val itemFontSize = 2.0 / 3.0 @@ -282,22 +281,22 @@ object NEUItems { val amount = ingredient.amount var internalItemId = ingredient.internalName // ignore cactus green - if (internalName == "ENCHANTED_CACTUS_GREEN".asInternalName() && internalItemId == "INK_SACK-2".asInternalName()) { - internalItemId = "CACTUS".asInternalName() + if (internalName == "ENCHANTED_CACTUS_GREEN".toInternalName() && internalItemId == "INK_SACK-2".toInternalName()) { + internalItemId = "CACTUS".toInternalName() } // ignore wheat in enchanted cookie - if (internalName == "ENCHANTED_COOKIE".asInternalName() && internalItemId == "WHEAT".asInternalName()) { + if (internalName == "ENCHANTED_COOKIE".toInternalName() && internalItemId == "WHEAT".toInternalName()) { continue } // ignore golden carrot in enchanted golden carrot - if (internalName == "ENCHANTED_GOLDEN_CARROT".asInternalName() && internalItemId == "GOLDEN_CARROT".asInternalName()) { + if (internalName == "ENCHANTED_GOLDEN_CARROT".toInternalName() && internalItemId == "GOLDEN_CARROT".toInternalName()) { continue } // ignore rabbit hide in leather - if (internalName == "LEATHER".asInternalName() && internalItemId == "RABBIT_HIDE".asInternalName()) { + if (internalName == "LEATHER".toInternalName() && internalItemId == "RABBIT_HIDE".toInternalName()) { continue } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveIngredient.kt b/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveIngredient.kt index b1692a119b62..79b27bb8c6d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveIngredient.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveIngredient.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.SKYBLOCK_COIN -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatDouble import io.github.moulberry.notenoughupdates.recipes.Ingredient @@ -10,7 +10,7 @@ class PrimitiveIngredient(val internalName: NEUInternalName, val count: Double = constructor(internalName: NEUInternalName, count: Int) : this(internalName, count.toDouble()) constructor(ingredientIdentifier: String) : this( - ingredientIdentifier.substringBefore(':').asInternalName(), + ingredientIdentifier.substringBefore(':').toInternalName(), // if second part is blank, the count is assumed to be 1 ingredientIdentifier.substringAfter(':', "").let { if (it.isBlank()) 1.0 else it.formatDouble() }, ) @@ -19,7 +19,7 @@ class PrimitiveIngredient(val internalName: NEUInternalName, val count: Double = fun coinIngredient(count: Double = 1.0) = PrimitiveIngredient(SKYBLOCK_COIN, count) fun fromNeuIngredient(neuIngredient: Ingredient) = - PrimitiveIngredient(neuIngredient.internalItemId.asInternalName(), neuIngredient.count) + PrimitiveIngredient(neuIngredient.internalItemId.toInternalName(), neuIngredient.count) fun Set.toPrimitiveItemStacks(): List = map { it.toPrimitiveItemStack() } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 128b5d11e877..d3b9bb6dc8b4 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.extraAttributes import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.StringUtils.removeColor import com.google.gson.JsonObject import net.minecraft.item.Item @@ -97,26 +97,26 @@ object SkyBlockItemModifierUtils { fun ItemStack.getPetLevel(): Int = PetAPI.getPetLevel(displayName) ?: 0 - fun ItemStack.getMaxPetLevel() = if (this.getInternalName() == "GOLDEN_DRAGON;4".asInternalName()) 200 else 100 + fun ItemStack.getMaxPetLevel() = if (this.getInternalName() == "GOLDEN_DRAGON;4".toInternalName()) 200 else 100 fun ItemStack.getDrillUpgrades() = getExtraAttributes()?.let { val list = mutableListOf() for (attributes in it.keySet) { if (attributes in drillPartTypes) { val upgradeItem = it.getString(attributes) - list.add(upgradeItem.uppercase().asInternalName()) + list.add(upgradeItem.uppercase().toInternalName()) } } list } - fun ItemStack.getPowerScroll() = getAttributeString("power_ability_scroll")?.asInternalName() + fun ItemStack.getPowerScroll() = getAttributeString("power_ability_scroll")?.toInternalName() fun ItemStack.getEnrichment() = getAttributeString("talisman_enrichment") - fun ItemStack.getHelmetSkin() = getAttributeString("skin")?.asInternalName() + fun ItemStack.getHelmetSkin() = getAttributeString("skin")?.toInternalName() - fun ItemStack.getArmorDye() = getAttributeString("dye_item")?.asInternalName() + fun ItemStack.getArmorDye() = getAttributeString("dye_item")?.toInternalName() fun ItemStack.getFungiCutterMode() = getAttributeString("fungi_cutter_mode") @@ -127,7 +127,7 @@ object SkyBlockItemModifierUtils { val runesList = runesMap.keySet.associateWith { runesMap.getInteger(it) }.toList() if (runesList.isEmpty()) return null val (name, tier) = runesList.first() - return "${name.uppercase()}_RUNE;$tier".asInternalName() + return "${name.uppercase()}_RUNE;$tier".toInternalName() } fun ItemStack.getAbilityScrolls() = getExtraAttributes()?.let { @@ -138,7 +138,7 @@ object SkyBlockItemModifierUtils { for (i in 0..3) { val text = tagList.get(i).toString() if (text == "END") break - list.add(text.replace("\"", "").asInternalName()) + list.add(text.replace("\"", "").toInternalName()) } } } @@ -277,7 +277,7 @@ object SkyBlockItemModifierUtils { class GemstoneSlot(val type: GemstoneType, val quality: GemstoneQuality) { - fun getInternalName() = "${quality}_${type}_GEM".asInternalName() + fun getInternalName() = "${quality}_${type}_GEM".toInternalName() } enum class GemstoneQuality(val displayName: String) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt b/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt index db80bfa80ca4..68c1d6888ac3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.features.garden.pests.PestType import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.toInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark @@ -34,7 +34,7 @@ object SkyHanniTypeAdapters { val INTERNAL_NAME: TypeAdapter = SimpleStringTypeAdapter( { this.asString() }, - { this.asInternalName() }, + { this.toInternalName() }, ) val VEC_STRING: TypeAdapter = SimpleStringTypeAdapter( diff --git a/versions/1.8.9/detekt/baseline.xml b/versions/1.8.9/detekt/baseline.xml index 4c29471726c1..40cec31b9932 100644 --- a/versions/1.8.9/detekt/baseline.xml +++ b/versions/1.8.9/detekt/baseline.xml @@ -293,9 +293,9 @@ VarCouldBeVal:TrevorFeatures.kt$TrevorFeatures$private var backupTrapperID: Int = 17 VarCouldBeVal:TrevorFeatures.kt$TrevorFeatures$private var trapperID: Int = 56 VarCouldBeVal:TrophyFishDisplay.kt$TrophyFishDisplay$private var recentlyDroppedTrophies = TimeLimitedCache<NEUInternalName, TrophyRarity>(5.seconds) - VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var fillerID = "STAINED_GLASS_PANE".asInternalName() - VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var limboID = "ENDER_PEARL".asInternalName() + VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var fillerID = "STAINED_GLASS_PANE".toInternalName() + VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var limboID = "ENDER_PEARL".toInternalName() VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var skillOverflowLuck = mutableMapOf<SkillType, Int>() - VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var skillsID = "DIAMOND_SWORD".asInternalName() + VarCouldBeVal:UserLuckBreakdown.kt$UserLuckBreakdown$private var skillsID = "DIAMOND_SWORD".toInternalName()