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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Inventory>
inventory(ServerLocation at)
Returns the Inventory at given location if owned by this Carrier.Optional<Inventory>
inventory(ServerLocation at, Direction from)
Returns the Inventory at given location if owned by this Carrier and accessible from given direction.List<ServerLocation>
locations()
Returns the Locations of the Blocks.-
Methods inherited from interface org.spongepowered.api.item.inventory.BlockCarrier
inventory
-
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
-
-
-
Method Detail
-
locations
List<ServerLocation> locations()
Returns the Locations of the Blocks.- Returns:
- The Locations of the Blocks
-
inventory
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
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 Locationfrom
- The Direction- Returns:
- The inventory at the location when accessed from given direction
-
-