Package org.moddingx.libx.inventory
Interface IAdvancedItemHandlerModifiable
- All Superinterfaces:
IAdvancedItemHandler,net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
- All Known Implementing Classes:
BaseItemStackHandler,StackItemHandler
public interface IAdvancedItemHandlerModifiable
extends net.neoforged.neoforge.items.IItemHandlerModifiable, IAdvancedItemHandler
Rich interface that provides some default methods to an
IItemHandlerModifiable.
Just implement this together with IItemHandlerModifiable.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclear()Clears all slots from the item handler.default intClears all stacks from the item handler that match a predicate.wrap(net.neoforged.neoforge.items.IItemHandlerModifiable handler) Creates a new IAdvancedItemHandlerModifiable from anIItemHandlerModifiable.Methods inherited from interface org.moddingx.libx.inventory.IAdvancedItemHandler
extractItem, extractItem, hasSpaceFor, hasSpaceFor, insertItemMethods inherited from interface net.neoforged.neoforge.items.IItemHandler
extractItem, getSlotLimit, getSlots, getStackInSlot, insertItem, isItemValidMethods inherited from interface net.neoforged.neoforge.items.IItemHandlerModifiable
setStackInSlot
-
Method Details
-
clear
default void clear()Clears all slots from the item handler. -
clear
Clears all stacks from the item handler that match a predicate.- Returns:
- The amount of items cleared.
-
wrap
static IAdvancedItemHandlerModifiable wrap(net.neoforged.neoforge.items.IItemHandlerModifiable handler) Creates a new IAdvancedItemHandlerModifiable from anIItemHandlerModifiable.
-