Interface BarrelInventory
- All Superinterfaces:
BlockInventory, Container
The slots of a barrel, read from and written to its block entity as
BlockInventory tells.
A barrel shows the rows the configuration of its world gives, from one to 6: its size is that of those rows. Its block entity holds up to 6 rows: when the configuration gives fewer rows than a barrel held, the items of the rows it no longer shows are either kept out of reach or cleared when a player opens it, as the configuration says. Breaking a barrel spills every item it holds, those of the rows it no longer shows included.
Choosing the rows of the barrels of a world is inspired by Purpur.
- Since:
- 0.1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe rows of a vanilla barrel.static final intThe most rows a barrel shows.static final intThe number of slots of one row. -
Method Summary
Methods inherited from interface BlockInventory
customName, lootTable, position, setCustomName, setLootTable, worldMethods inherited from interface Container
clear, contents, firstEmpty, get, isEmpty, set, setContents, size
-
Field Details
-
ROW_SIZE
static final int ROW_SIZEThe number of slots of one row.- Since:
- 0.1.0
- See Also:
-
MAX_ROWS
static final int MAX_ROWSThe most rows a barrel shows.- Since:
- 0.1.0
- See Also:
-
DEFAULT_ROWS
static final int DEFAULT_ROWSThe rows of a vanilla barrel.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
rows
-