Uses of Interface
net.neoforged.neoforge.items.IItemHandler
Package
Description
-
Uses of IItemHandler in net.neoforged.neoforge.capabilities
Modifier and TypeFieldDescriptionstatic final BlockCapability
<IItemHandler, @Nullable Direction> Capabilities.ItemHandler.BLOCK
static final EntityCapability
<IItemHandler, Void> Capabilities.ItemHandler.ENTITY
Capability for the inventory of an entity.static final EntityCapability
<IItemHandler, @Nullable 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, Void> Capabilities.ItemHandler.ITEM
-
Uses of IItemHandler in net.neoforged.neoforge.fluids
Modifier and TypeMethodDescriptionstatic FluidActionResult
FluidUtil.tryEmptyContainerAndStow
(ItemStack container, IFluidHandler fluidDestination, IItemHandler inventory, int maxAmount, @Nullable 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
(ItemStack container, IFluidHandler fluidSource, IItemHandler inventory, int maxAmount, @Nullable 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
Modifier and TypeClassDescriptionclass
Variant ofItemStackHandler
for use with data components.class
class
Modifier and TypeMethodDescriptionprivate static Optional
<org.apache.commons.lang3.tuple.Pair<IItemHandler, Object>> VanillaInventoryCodeHooks.getAttachedItemHandler
(Level level, BlockPos pos, Direction direction) private static Optional
<org.apache.commons.lang3.tuple.Pair<IItemHandler, Object>> VanillaInventoryCodeHooks.getItemHandlerAt
(Level worldIn, double x, double y, double z, Direction side) private static Optional
<org.apache.commons.lang3.tuple.Pair<IItemHandler, Object>> VanillaInventoryCodeHooks.getSourceItemHandler
(Level level, Hopper hopper) Modifier 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 ItemStack
ItemHandlerHelper.insertItem
(IItemHandler dest, ItemStack stack, boolean simulate) static ItemStack
ItemHandlerHelper.insertItemStacked
(IItemHandler inventory, ItemStack stack, boolean simulate) Inserts the ItemStack into the inventory, filling up already present stacks first.private static ItemStack
VanillaInventoryCodeHooks.insertStack
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability supportprivate static boolean
VanillaInventoryCodeHooks.isEmpty
(IItemHandler itemHandler) private static boolean
VanillaInventoryCodeHooks.isFull
(IItemHandler itemHandler) private static ItemStack
VanillaInventoryCodeHooks.putStackInInventoryAllSlots
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) ModifierConstructorDescriptionSlotItemHandler
(IItemHandler itemHandler, int index, int xPosition, int yPosition) -
Uses of IItemHandler in net.neoforged.neoforge.items.wrapper
Modifier 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
Modifier and TypeFieldDescriptionprotected final Supplier
<IItemHandler> ForwardingItemHandler.delegate