Interface DoubleChestInventory
- All Superinterfaces:
Container
A large chest: two chests standing side by side, facing the same way, seen as one container of
54 slots. Slots
0 to 26 are those of the first
half, the next ones those of the second.
It holds nothing of its own: reading and writing a slot reads and writes the chest holding
it, as ChestInventory tells.
- Since:
- 0.1.0
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancontains(BlockPosition position) Returnstrueif one of the two halves stands atposition.first()Returns the half holding slots0to26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state istype=right.second()Returns the half holding slots27to53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state istype=left.default Worldworld()Returns the world of the large chest.Methods inherited from interface Container
clear, contents, firstEmpty, get, isEmpty, set, setContents, size
-
Field Details
-
SIZE
static final int SIZEThe number of slots of a large chest.- Since:
- 0.1.0
- See Also:
-
-
Method Details
-
world
Returns the world of the large chest.- Returns:
- the world of the large chest
- Since:
- 0.1.0
-
first
ChestInventory first()Returns the half holding slots0to26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state istype=right.- Returns:
- the half holding slots
0to26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state istype=right - Since:
- 0.1.0
-
second
ChestInventory second()Returns the half holding slots27to53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state istype=left.- Returns:
- the half holding slots
27to53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state istype=left - Since:
- 0.1.0
-
contains
Returnstrueif one of the two halves stands atposition.- Parameters:
position- a block position, in the world of the large chest- Returns:
trueif one of the two halves stands atposition- Since:
- 0.1.0
-