diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt index 85b6296b5..a5e504245 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.api.GetFromSackAPI import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.NEUInternalName +import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.PrimitiveItemStack import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -12,8 +13,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class SuperCraftFeatures { private val craftedPattern by RepoPattern.pattern( - "inventory.supercrafting.craft", - "§eYou Supercrafted §r§r§r§.(?<item>[^§]+)(?:§r§8x(?<amount>\\d+))?§r§e!" + "inventory.supercrafting.craft.new", + "§eYou Supercrafted §r§r§r§.(?<item>[^§]+)(?:§r§8x(?<amount>[\\d,]+))?§r§e!" ) private val config get() = SkyHanniMod.feature.inventory.gfs @@ -21,7 +22,7 @@ class SuperCraftFeatures { fun onChat(event: LorenzChatEvent) { if (!config.superCraftGFS) return val (internalName, amount) = craftedPattern.matchMatcher(event.message) { - NEUInternalName.fromItemName(this.group("item")) to (this.group("amount")?.toInt() ?: 1) + NEUInternalName.fromItemName(this.group("item")) to (this.group("amount")?.formatInt() ?: 1) } ?: return if (!GetFromSackAPI.sackListInternalNames.contains(internalName.asString())) return DelayedRun.runNextTick { |