Interface DoubleChestInventory

All Superinterfaces:
Container

public interface DoubleChestInventory extends 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
    Modifier and Type
    Field
    Description
    static final int
    The number of slots of a large chest.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if one of the two halves stands at position.
    Returns the half holding slots 0 to 26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state is type=right.
    Returns the half holding slots 27 to 53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state is type=left.
    default World
    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 SIZE
      The number of slots of a large chest.
      Since:
      0.1.0
      See Also:
  • Method Details

    • world

      default World world()
      Returns the world of the large chest.
      Returns:
      the world of the large chest
      Since:
      0.1.0
    • first

      Returns the half holding slots 0 to 26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state is type=right.
      Returns:
      the half holding slots 0 to 26, the top three rows of the window: the one on the left of a player facing the front of the large chest, whose state is type=right
      Since:
      0.1.0
    • second

      ChestInventory second()
      Returns the half holding slots 27 to 53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state is type=left.
      Returns:
      the half holding slots 27 to 53, the bottom three rows of the window: the one on the right of a player facing the front of the large chest, whose state is type=left
      Since:
      0.1.0
    • contains

      default boolean contains(BlockPosition position)
      Returns true if one of the two halves stands at position.
      Parameters:
      position - a block position, in the world of the large chest
      Returns:
      true if one of the two halves stands at position
      Since:
      0.1.0