Package net.minecraftforge.items
Class VanillaInventoryCodeHooks
java.lang.Object
net.minecraftforge.items.VanillaInventoryCodeHooks
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleandropperInsertHook(Level level, BlockPos pos, DispenserBlockEntity dropper, int slot, @NotNull ItemStack stack) Copied from BlockDropper#dispense and added capability supportstatic @Nullable BooleanextractHook(Level level, Hopper dest) Copied from TileEntityHopper#captureDroppedItems and added capability supportstatic Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(Level worldIn, double x, double y, double z, Direction side) private static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(Level level, Hopper hopper, Direction hopperFacing) static booleaninsertHook(HopperBlockEntity hopper) Copied from TileEntityHopper#transferItemsOut and added capability supportprivate static ItemStackinsertStack(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability supportprivate static booleanisEmpty(IItemHandler itemHandler) private static booleanisFull(IItemHandler itemHandler) private static ItemStackputStackInInventoryAllSlots(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) 
- 
Constructor Details- 
VanillaInventoryCodeHookspublic VanillaInventoryCodeHooks()
 
- 
- 
Method Details- 
extractHookCopied from TileEntityHopper#captureDroppedItems and added capability support- Returns:
- Null if we did nothing {no IItemHandler}, True if we moved an item, False if we moved no items
 
- 
dropperInsertHookpublic static boolean dropperInsertHook(Level level, BlockPos pos, DispenserBlockEntity dropper, int slot, @NotNull @NotNull ItemStack stack) Copied from BlockDropper#dispense and added capability support
- 
insertHookCopied from TileEntityHopper#transferItemsOut and added capability support
- 
putStackInInventoryAllSlotsprivate static ItemStack putStackInInventoryAllSlots(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) 
- 
insertStackprivate static ItemStack insertStack(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability support
- 
getItemHandler
- 
isFull
- 
isEmpty
- 
getItemHandlerpublic static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(Level worldIn, double x, double y, double z, Direction side) 
 
-