Package net.minecraftforge.items
Class VanillaInventoryCodeHooks
java.lang.Object
net.minecraftforge.items.VanillaInventoryCodeHooks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandropperInsertHook(World world, BlockPos pos, DispenserTileEntity dropper, int slot, ItemStack stack) Copied from BlockDropper#dispense and added capability supportstatic BooleanextractHook(IHopper dest) Copied from TileEntityHopper#captureDroppedItems and added capability supportprivate static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(IHopper hopper, Direction hopperFacing) static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(World worldIn, double x, double y, double z, Direction side) static booleaninsertHook(HopperTileEntity hopper) Copied from TileEntityHopper#transferItemsOut and added capability supportprivate static ItemStackinsertStack(TileEntity 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(TileEntity source, Object destination, IItemHandler destInventory, ItemStack stack)
-
Constructor Details
-
VanillaInventoryCodeHooks
public VanillaInventoryCodeHooks()
-
-
Method Details
-
extractHook
Copied 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
-
dropperInsertHook
public static boolean dropperInsertHook(World world, BlockPos pos, DispenserTileEntity dropper, int slot, @Nonnull ItemStack stack) Copied from BlockDropper#dispense and added capability support -
insertHook
Copied from TileEntityHopper#transferItemsOut and added capability support -
putStackInInventoryAllSlots
private static ItemStack putStackInInventoryAllSlots(TileEntity source, Object destination, IItemHandler destInventory, ItemStack stack) -
insertStack
private static ItemStack insertStack(TileEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability support -
getItemHandler
private static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(IHopper hopper, Direction hopperFacing) -
isFull
-
isEmpty
-
getItemHandler
public static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(World worldIn, double x, double y, double z, Direction side)
-