diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-23 22:34:07 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-23 22:34:07 +0200 |
commit | ef58e92c169ac94370c8a6dd48146587571cf8d2 (patch) | |
tree | 2573525c9c49f21194621a5b86ea3cb00f1fcf55 /src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | |
parent | d1ee14065e1eafd1e0679bf4290087947d9564bd (diff) | |
download | skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.tar.gz skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.tar.bz2 skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.zip |
added rng meter coloring methods
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index c9ddea9a8..24c3d822a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -7,6 +7,7 @@ import com.google.gson.JsonObject import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.init.Items +import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack import net.minecraftforge.common.util.Constants import java.util.* @@ -16,8 +17,8 @@ object ItemUtils { fun ItemStack.cleanName() = this.displayName.removeColor() - fun getItemsInOpenChest(): List<ItemStack> { - val list = mutableListOf<ItemStack>() + fun getItemsInOpenChest(): List<Slot> { + val list = mutableListOf<Slot>() val guiChest = Minecraft.getMinecraft().currentScreen as GuiChest val inventorySlots = guiChest.inventorySlots.inventorySlots val skipAt = inventorySlots.size - 9 * 4 @@ -25,7 +26,7 @@ object ItemUtils { for (slot in inventorySlots) { val stack = slot.stack if (stack != null) { - list.add(stack) + list.add(slot) } i++ if (i == skipAt) break |