All Superinterfaces:
BlockCarrier, BlockEntity, Carrier, CarrierBlockEntity, CopyableDataHolder, DataHolder, DataHolder.Mutable, DataSerializable, Locatable, NameableBlockEntity, NameableCarrierBlockEntity, SerializableDataHolder, SerializableDataHolder.Mutable, ValueContainer
All Known Subinterfaces:
TrappedChest

public interface Chest extends NameableCarrierBlockEntity
Represents a Chest.
  • Method Details

    • doubleChestInventory

      Optional<Inventory> doubleChestInventory()
      Returns the inventory representing the combination of this chest and its neighbor (which form a double chest), if available.

      If this chest is not part of a double chest, then this method will return Optional.empty().

      Returns:
      The combined inventory, if available
    • connectedChest

      Optional<Chest> connectedChest()
      Returns the connected Chest, if available.

      If this chest is not part of a double chest, then this method will return Optional.empty().

      Returns:
      The connected Chest, if available
    • attachmentType

      default Value.Mutable<ChestAttachmentType> attachmentType()
      Returns:
      The attachment type of this chest.