From 3e19b97b52fae7422f8b0654da9341bf8c2393cb Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 15 Feb 2024 18:41:10 +0100 Subject: Added item ids --- src/main/java/moe/nea/ledger/BazaarDetection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 (?[0-9]+)x (?.*) for (?$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(), ) ) -- cgit