类 VanillaInventoryCodeHooks

java.lang.Object
net.neoforged.neoforge.items.VanillaInventoryCodeHooks

@Internal public class VanillaInventoryCodeHooks extends Object
  • 构造器详细资料

    • VanillaInventoryCodeHooks

      public VanillaInventoryCodeHooks()
  • 方法详细资料

    • extractHook

      public static boolean extractHook(Hopper dest, IItemHandler handler)
      Tries to extract items from an item handler and insert them in the hopper.
      参数:
      handler - target item handler
      返回:
      true if we moved an item, false if we moved no items
    • insertHook

      public static boolean insertHook(HopperBlockEntity hopper, IItemHandler itemHandler)
      Tries to insert a hopper's items into an item handler.
      参数:
      itemHandler - target item handler
      返回:
      true if we moved an item, false if we moved no items
    • isFull

      private static boolean isFull(IItemHandler itemHandler)
    • getEntityContainerOrHandler

      public static ContainerOrHandler getEntityContainerOrHandler(Level level, double x, double y, double z, @Nullable @Nullable Direction side)