Class PlayerExtendedInventoryIterator

java.lang.Object
org.cyclops.cyclopscore.inventory.PlayerExtendedInventoryIterator
All Implemented Interfaces:
Iterator<net.minecraft.world.item.ItemStack>

public class PlayerExtendedInventoryIterator extends Object implements Iterator<net.minecraft.world.item.ItemStack>
Iterate over a player's inventory and any other attached inventory like baubles.
  • Constructor Details

    • PlayerExtendedInventoryIterator

      public PlayerExtendedInventoryIterator(net.minecraft.world.entity.player.Player player)
      Create a new HotbarIterator.
      Parameters:
      player - The player to iterate the hotbar from.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<net.minecraft.world.item.ItemStack>
    • next

      public net.minecraft.world.item.ItemStack next()
      Specified by:
      next in interface Iterator<net.minecraft.world.item.ItemStack>
    • nextIndexed

      public ItemLocation nextIndexed()
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<net.minecraft.world.item.ItemStack>
    • replace

      public void replace(net.minecraft.world.item.ItemStack itemStack)
      Replaces the itemstack on the position of the last returned itemstack.
      Parameters:
      itemStack - The itemstack to place.