Skip to content

Commit

Permalink
Backend: Remove asInternalName (#2893)
Browse files Browse the repository at this point in the history
Co-authored-by: Cal <cwolfson58@gmail.com>
  • Loading branch information
j10a1n15 and CalMWolfs authored Nov 12, 2024
1 parent b772440 commit 2049030
Show file tree
Hide file tree
Showing 84 changed files with 339 additions and 344 deletions.
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -41,7 +41,7 @@ object CollectionAPI {

// TODO repo
private val incorrectCollectionNames = mapOf(
"Mushroom" to "RED_MUSHROOM".asInternalName()
"Mushroom" to "RED_MUSHROOM".toInternalName()
)

@SubscribeEvent
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/HotmAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<ItemStack, Boolean>(10.0.seconds)
val isBlueEggActive
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand Down Expand Up @@ -290,10 +290,10 @@ object QuiverAPI {
@SubscribeEvent
fun onRepoReload(event: RepositoryReloadEvent) {
val arrowData = event.getConstant<ArrowTypeJson>("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)
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -378,7 +378,7 @@ object SackAPI {
fun testSackAPI(args: Array<String>) {
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.")
}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -53,7 +53,7 @@ data class NeuReforgeJson(
is Map<*, *> -> {
val type = "SPECIAL_ITEMS"
val map = any as? Map<String, List<String>> ?: 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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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")
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,7 +28,7 @@ object DungeonArchitectFeatures {
"§4\\[STATUE] Oruo the Omniscient§r§f: (?:§.)*(?<name>\\S*) (?:§.)*chose the wrong .*"
)

private val architectsFirstDraftItem = "ARCHITECT_FIRST_DRAFT".asInternalName()
private val architectsFirstDraftItem = "ARCHITECT_FIRST_DRAFT".toInternalName()

@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
Expand All @@ -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()
Expand Down
Loading

0 comments on commit 2049030

Please sign in to comment.