Class FallbackMountedStorage

All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler, net.neoforged.neoforge.items.IItemHandlerModifiable

public class FallbackMountedStorage extends SimpleMountedStorage
A fallback mounted storage impl that will try to be used when no type is registered for a block. This requires that the mounted block provide an item handler whose class is exactly ItemStackHandler.
  • Field Details

  • Constructor Details

    • FallbackMountedStorage

      public FallbackMountedStorage(net.neoforged.neoforge.items.IItemHandler handler)
  • Method Details

    • validate

      protected Optional<net.neoforged.neoforge.items.IItemHandlerModifiable> validate(net.neoforged.neoforge.items.IItemHandler handler)
      Description copied from class: SimpleMountedStorage
      Make sure the targeted handler is valid for copying items back into. It is highly recommended to call super in overrides.
      Overrides:
      validate in class SimpleMountedStorage
    • isValid

      public static boolean isValid(net.neoforged.neoforge.items.IItemHandler handler)