类 VanillaInventoryCodeHooks
java.lang.Object
net.minecraftforge.items.VanillaInventoryCodeHooks
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static boolean
dropperInsertHook
(Level level, BlockPos pos, DispenserBlockEntity dropper, int slot, @NotNull ItemStack stack) Copied from BlockDropper#dispense and added capability supportstatic @Nullable Boolean
extractHook
(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 boolean
insertHook
(HopperBlockEntity hopper) Copied from TileEntityHopper#transferItemsOut and added capability supportprivate static ItemStack
insertStack
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability supportprivate static boolean
isEmpty
(IItemHandler itemHandler) private static boolean
isFull
(IItemHandler itemHandler) private static ItemStack
putStackInInventoryAllSlots
(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack)
-
构造器详细资料
-
VanillaInventoryCodeHooks
public VanillaInventoryCodeHooks()
-
-
方法详细资料
-
extractHook
Copied from TileEntityHopper#captureDroppedItems and added capability support- 返回:
- Null if we did nothing {no IItemHandler}, True if we moved an item, False if we moved no items
-
dropperInsertHook
public static boolean dropperInsertHook(Level level, BlockPos pos, DispenserBlockEntity dropper, int slot, @NotNull @NotNull ItemStack stack) Copied from BlockDropper#dispense and added capability support -
insertHook
Copied from TileEntityHopper#transferItemsOut and added capability support -
putStackInInventoryAllSlots
private static ItemStack putStackInInventoryAllSlots(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack) -
insertStack
private static ItemStack insertStack(BlockEntity source, Object destination, IItemHandler destInventory, ItemStack stack, int slot) Copied from TileEntityHopper#insertStack and added capability support -
getItemHandler
-
isFull
-
isEmpty
-
getItemHandler
public static Optional<org.apache.commons.lang3.tuple.Pair<IItemHandler,Object>> getItemHandler(Level worldIn, double x, double y, double z, Direction side)
-