aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/minion
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/minion')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionCollectLogic.kt11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCollectLogic.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCollectLogic.kt
index 9be2186ad..05aefc1f4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCollectLogic.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCollectLogic.kt
@@ -4,12 +4,13 @@ import at.hannibal2.skyhanni.api.CollectionAPI
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.MinionOpenEvent
import at.hannibal2.skyhanni.utils.InventoryUtils
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_new
+import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUItems
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class MinionCollectLogic {
- private var oldMap = mapOf<String, Int>()
+ private var oldMap = mapOf<NEUInternalName, Int>()
@SubscribeEvent
fun onMinionOpen(event: MinionOpenEvent) {
@@ -17,10 +18,10 @@ class MinionCollectLogic {
oldMap = count()
}
- private fun count(): MutableMap<String, Int> {
- val map = mutableMapOf<String, Int>()
+ private fun count(): MutableMap<NEUInternalName, Int> {
+ val map = mutableMapOf<NEUInternalName, Int>()
for (stack in InventoryUtils.getItemsInOwnInventory()) {
- val internalName = stack.getInternalName()
+ val internalName = stack.getInternalName_new()
val (newId, amount) = NEUItems.getMultiplier(internalName)
val old = map[newId] ?: 0
map[newId] = old + amount * stack.stackSize