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 java.util.Optional<Inventory>
inventory(ServerLocation at)
Returns the Inventory at given location if owned by this Carrier.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.java.util.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
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 Locationfrom
- The Direction- Returns:
- The inventory at the location when accessed from given direction
-
-