Class VanillaInventoryCodeHooks

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

@Internal public class VanillaInventoryCodeHooks extends Object
  • Constructor Details

    • VanillaInventoryCodeHooks

      public VanillaInventoryCodeHooks()
  • Method Details

    • extractHook

      public static boolean extractHook(Hopper dest, IItemHandler handler)
      Tries to extract items from an item handler and insert them in the hopper.
      Parameters:
      handler - target item handler
      Returns:
      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.
      Parameters:
      itemHandler - target item handler
      Returns:
      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)