Interface Chest
- All Superinterfaces:
BlockCarrier,BlockEntity,Carrier,CarrierBlockEntity,CopyableDataHolder,DataHolder,DataHolder.Mutable,DataSerializable,Locatable,NameableBlockEntity,NameableCarrierBlockEntity,SerializableDataHolder,SerializableDataHolder.Mutable,ValueContainer
- All Known Subinterfaces:
TrappedChest
Represents a Chest.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.MutableNested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolder
SerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable -
Method Summary
Modifier and TypeMethodDescriptiondefault Value.Mutable<ChestAttachmentType>Returns the connectedChest, if available.Returns the inventory representing the combination of this chest and its neighbor (which form a double chest), if available.Methods inherited from interface org.spongepowered.api.item.inventory.BlockCarrier
inventoryMethods inherited from interface org.spongepowered.api.block.entity.BlockEntity
block, copy, createArchetype, isValid, locatableBlock, mirror, mirror, rotate, rotate, setValid, typeMethods inherited from interface org.spongepowered.api.block.entity.carrier.CarrierBlockEntity
inventory, lockTokenMethods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undoMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainerMethods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, worldMethods inherited from interface org.spongepowered.api.block.entity.NameableBlockEntity
displayNameMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawDataMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutable
setRawData
-
Method Details
-
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
Returns the connectedChest, 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
- Returns:
- The attachment type of this chest.
-