Uses of Interface
net.neoforged.neoforge.items.IItemHandler
Packages that use IItemHandler
Package
Description
-
Uses of IItemHandler in net.neoforged.neoforge.capabilities
Fields in net.neoforged.neoforge.capabilities with type parameters of type IItemHandlerModifier and TypeFieldDescriptionstatic final BlockCapability
<IItemHandler, @Nullable net.minecraft.core.Direction> Capabilities.ItemHandler.BLOCK
static final EntityCapability
<IItemHandler, @Nullable Void> Capabilities.ItemHandler.ENTITY
Capability for the inventory of an entity.static final EntityCapability
<IItemHandler, @Nullable net.minecraft.core.Direction> Capabilities.ItemHandler.ENTITY_AUTOMATION
Capability for an inventory of entity that should be accessible to automation, in the sense that droppers, hoppers, and similar modded devices will try to use it.static final ItemCapability
<IItemHandler, @Nullable Void> Capabilities.ItemHandler.ITEM
-
Uses of IItemHandler in net.neoforged.neoforge.fluids
Methods in net.neoforged.neoforge.fluids with parameters of type IItemHandlerModifier and TypeMethodDescriptionstatic FluidActionResult
FluidUtil.tryEmptyContainerAndStow
(net.minecraft.world.item.ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable net.minecraft.world.entity.player.Player player, boolean doDrain) Takes an Fluid Container Item, tries to empty it into the fluid handler, and stows it in the given inventory.static FluidActionResult
FluidUtil.tryFillContainerAndStow
(net.minecraft.world.item.ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable net.minecraft.world.entity.player.Player player, boolean doFill) Takes an Fluid Container Item and tries to fill it from the given tank. -
Uses of IItemHandler in net.neoforged.neoforge.items
Subinterfaces of IItemHandler in net.neoforged.neoforge.itemsClasses in net.neoforged.neoforge.items that implement IItemHandlerModifier and TypeClassDescriptionclass
Variant ofItemStackHandler
for use with data components.class
class
Fields in net.neoforged.neoforge.items declared as IItemHandlerModifier and TypeFieldDescriptionprivate final @Nullable IItemHandler
ContainerOrHandler.itemHandler
The field for theitemHandler
record component.private final IItemHandler
SlotItemHandler.itemHandler
Methods in net.neoforged.neoforge.items that return IItemHandlerModifier and TypeMethodDescriptionItemHandlerCopySlot.getItemHandler()
SlotItemHandler.getItemHandler()
@Nullable IItemHandler
ContainerOrHandler.itemHandler()
Returns the value of theitemHandler
record component.Methods in net.neoforged.neoforge.items with parameters of type IItemHandlerModifier and TypeMethodDescriptionstatic int
ItemHandlerHelper.calcRedstoneFromInventory
(@Nullable IItemHandler inv) This method uses the standard vanilla algorithm to calculate a comparator output for how "full" the inventory is.static boolean
VanillaInventoryCodeHooks.extractHook
(net.minecraft.world.level.block.entity.Hopper dest, IItemHandler handler) Tries to extract items from an item handler and insert them in the hopper.static boolean
VanillaInventoryCodeHooks.insertHook
(net.minecraft.world.level.block.entity.HopperBlockEntity hopper, IItemHandler itemHandler) Tries to insert a hopper's items into an item handler.static net.minecraft.world.item.ItemStack
ItemHandlerHelper.insertItem
(IItemHandler dest, net.minecraft.world.item.ItemStack stack, boolean simulate) static net.minecraft.world.item.ItemStack
ItemHandlerHelper.insertItemStacked
(IItemHandler inventory, net.minecraft.world.item.ItemStack stack, boolean simulate) Inserts the ItemStack into the inventory, filling up already present stacks first.private static boolean
VanillaInventoryCodeHooks.isFull
(IItemHandler itemHandler) Constructors in net.neoforged.neoforge.items with parameters of type IItemHandlerModifierConstructorDescriptionContainerOrHandler
(@Nullable net.minecraft.world.Container container, @Nullable IItemHandler itemHandler) Creates an instance of aContainerOrHandler
record class.ItemHandlerCopySlot
(IItemHandler itemHandler, int index, int xPosition, int yPosition) SlotItemHandler
(IItemHandler itemHandler, int index, int xPosition, int yPosition) -
Uses of IItemHandler in net.neoforged.neoforge.items.wrapper
Classes in net.neoforged.neoforge.items.wrapper that implement IItemHandlerModifier and TypeClassDescriptionclass
class
class
Exposes the armor inventory of anLivingEntity
as anIItemHandler
usingLivingEntity.getItemBySlot(EquipmentSlot)
andLivingEntity.setItemSlot(EquipmentSlot, ItemStack)
.class
Exposes the armor or hands inventory of anLivingEntity
as anIItemHandler
usingLivingEntity.getItemBySlot(EquipmentSlot)
andLivingEntity.setItemSlot(EquipmentSlot, ItemStack)
.class
Exposes the hands inventory of anLivingEntity
as anIItemHandler
usingLivingEntity.getItemBySlot(EquipmentSlot)
andLivingEntity.setItemSlot(EquipmentSlot, ItemStack)
.class
AnIItemHandler
that delegates each method to anotherIItemHandler
.class
class
class
class
Exposes the player inventory WITHOUT the armor inventory as IItemHandler.class
class
A wrapper that composes another IItemHandlerModifiable, exposing only a range of the composed slots.class
Fields in net.neoforged.neoforge.items.wrapper declared as IItemHandlerModifier and TypeFieldDescriptionstatic final IItemHandler
EmptyItemHandler.INSTANCE
protected final IItemHandler
RecipeWrapper.inv
Fields in net.neoforged.neoforge.items.wrapper with type parameters of type IItemHandlerModifier and TypeFieldDescriptionprotected final Supplier
<IItemHandler> ForwardingItemHandler.delegate
Constructors in net.neoforged.neoforge.items.wrapper with parameters of type IItemHandlerConstructor parameters in net.neoforged.neoforge.items.wrapper with type arguments of type IItemHandler