java.lang.Object
org.cyclops.commoncapabilities.capability.itemhandler.ItemItemHandler
All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler, net.neoforged.neoforge.items.IItemHandlerModifiable
Direct Known Subclasses:
VanillaItemBundleItemHandler, VanillaItemShulkerBoxItemHandler

public abstract class ItemItemHandler extends Object implements net.neoforged.neoforge.items.IItemHandlerModifiable
An item handler wrapper for items.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemItemHandler(net.minecraft.world.item.ItemStack itemStack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    extractItem(int slot, int amount, boolean simulate)
     
    protected abstract net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
    net.minecraft.world.item.ItemStack
     
    net.minecraft.world.item.ItemStack
    getStackInSlot(int slot)
     
    net.minecraft.world.item.ItemStack
    insertItem(int slot, net.minecraft.world.item.ItemStack stack, boolean simulate)
     
    protected abstract void
    setItemList(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemStacks)
     
    void
    setStackInSlot(int slot, net.minecraft.world.item.ItemStack stack)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.items.IItemHandler

    getSlotLimit, getSlots, isItemValid
  • Constructor Details

    • ItemItemHandler

      public ItemItemHandler(net.minecraft.world.item.ItemStack itemStack)
  • Method Details

    • getItemStack

      public net.minecraft.world.item.ItemStack getItemStack()
    • getItemList

      protected abstract net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItemList()
    • setItemList

      protected abstract void setItemList(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> itemStacks)
    • setStackInSlot

      public void setStackInSlot(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setStackInSlot in interface net.neoforged.neoforge.items.IItemHandlerModifiable
    • getStackInSlot

      @Nonnull public net.minecraft.world.item.ItemStack getStackInSlot(int slot)
      Specified by:
      getStackInSlot in interface net.neoforged.neoforge.items.IItemHandler
    • insertItem

      @Nonnull public net.minecraft.world.item.ItemStack insertItem(int slot, @Nonnull net.minecraft.world.item.ItemStack stack, boolean simulate)
      Specified by:
      insertItem in interface net.neoforged.neoforge.items.IItemHandler
    • extractItem

      @Nonnull public net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate)
      Specified by:
      extractItem in interface net.neoforged.neoforge.items.IItemHandler