Skip to content

Commit

Permalink
fix(AutoShopInventoryManager): errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DataM0del committed Feb 7, 2025
1 parent 6aa8228 commit 8f5ec9e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import net.ccbluex.liquidbounce.utils.item.getPotionEffects
import net.ccbluex.liquidbounce.utils.item.isNothing
import net.ccbluex.liquidbounce.utils.kotlin.incrementOrSet
import net.ccbluex.liquidbounce.utils.kotlin.sumValues
import net.minecraft.entity.player.PlayerInventory
import net.minecraft.item.ItemStack
import net.minecraft.item.PotionItem
import net.minecraft.registry.Registries

Expand All @@ -38,9 +40,10 @@ class AutoShopInventoryManager : EventListener {
@Suppress("unused")
// update the items from the player's inventory every tick
private val onTick = handler<GameTickEvent> {
val inventoryItems = player.inventory.main.toMutableList().apply {
addAll(player.inventory.armor)
addAll(player.inventory.offHand)
val inventoryItems = player.inventory.mainStacks.toMutableList().apply {
// TODO: please work lo
addAll(PlayerInventory.equipmentSlots.values as Collection<ItemStack>)
addAll(listOf(player.offHandStack))
}

val newItems = mutableMapOf<String, Int>()
Expand Down

0 comments on commit 8f5ec9e

Please sign in to comment.