aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/CraftMaterialsFromBazaar.kt10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/CraftMaterialsFromBazaar.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/CraftMaterialsFromBazaar.kt
index b5c3c6ab4..36b5fa505 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/CraftMaterialsFromBazaar.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/CraftMaterialsFromBazaar.kt
@@ -17,10 +17,8 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.shortFormat
import at.hannibal2.skyhanni.utils.PrimitiveItemStack
import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack
-import at.hannibal2.skyhanni.utils.RegexUtils.matches
import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables
import at.hannibal2.skyhanni.utils.renderables.Renderable
-import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@SkyHanniModule
@@ -29,10 +27,6 @@ object CraftMaterialsFromBazaar {
private val config get() = SkyHanniMod.feature.inventory.bazaar
private val materialSlots = listOf(10, 11, 12, 19, 20, 21, 28, 29, 30)
- private val inventoryPattern by RepoPattern.pattern(
- "inventory.recipe.title",
- ".* Recipe"
- )
private var inRecipeInventory = false
private var purchasing = false
@@ -43,11 +37,11 @@ object CraftMaterialsFromBazaar {
@SubscribeEvent
fun onInventoryOpen(event: InventoryFullyOpenedEvent) {
if (!isEnabled()) return
- val correctInventoryName = inventoryPattern.matches(event.inventoryName)
val items = event.inventoryItems
val correctItem = items[23]?.name == "§aCrafting Table"
+ val correctSuperCraftItem = items[32]?.name == "§aSupercraft"
- inRecipeInventory = correctInventoryName && correctItem && !purchasing
+ inRecipeInventory = correctSuperCraftItem && correctItem && !purchasing
if (!inRecipeInventory) return
val recipeName = items[25]?.itemName ?: return