aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe')
-rw-r--r--src/main/java/moe/nea/ledger/BazaarDetection.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/moe/nea/ledger/BazaarDetection.kt b/src/main/java/moe/nea/ledger/BazaarDetection.kt
index aa3aeba..9bcab30 100644
--- a/src/main/java/moe/nea/ledger/BazaarDetection.kt
+++ b/src/main/java/moe/nea/ledger/BazaarDetection.kt
@@ -3,7 +3,7 @@ package moe.nea.ledger
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.regex.Pattern
-class BazaarDetection(val ledger: LedgerLogger) {
+class BazaarDetection(val ledger: LedgerLogger, val ids: ItemIdProvider) {
val instaBuyPattern =
Pattern.compile("\\[Bazaar\\] Bought (?<count>[0-9]+)x (?<what>.*) for (?<coins>$SHORT_NUMBER_PATTERN) coins!")
@@ -19,7 +19,7 @@ class BazaarDetection(val ledger: LedgerLogger) {
"BAZAAR_BUY_INSTANT",
event.timestamp,
parseShortNumber(group("coins")),
- group("what"),
+ ids.findForName(group("what")),
group("count").toInt(),
)
)
@@ -30,7 +30,7 @@ class BazaarDetection(val ledger: LedgerLogger) {
"BAZAAR_SELL_INSTANT",
event.timestamp,
parseShortNumber(group("coins")),
- group("what"),
+ ids.findForName(group("what")),
group("count").toInt(),
)
)