Interface MultiBlockCarrier

  • All Superinterfaces:
    BlockCarrier, Carrier, Locatable

    public interface MultiBlockCarrier
    extends BlockCarrier
    Represents Multiple Blocks that are the Carrier for an Inventory. e.g. A DoubleChest Inventory carried by two blocks
    • Method Detail

      • locations

        java.util.List<ServerLocation> locations()
        Returns the Locations of the Blocks.
        Returns:
        The Locations of the Blocks
      • inventory

        java.util.Optional<Inventory> inventory​(ServerLocation at)
        Returns the Inventory at given location if owned by this Carrier.
        Parameters:
        at - The location
        Returns:
        The inventory at given location
      • inventory

        java.util.Optional<Inventory> inventory​(ServerLocation at,
                                                Direction from)
        Returns the Inventory at given location if owned by this Carrier and accessible from given direction.

        e.g. A Furnace accessed from Direction.DOWN will return its Fuel Slot

        Parameters:
        at - The Location
        from - The Direction
        Returns:
        The inventory at the location when accessed from given direction