Package org.bukkit.block
Interface DecoratedPot
- All Superinterfaces:
BlockInventoryHolder
,BlockState
,InventoryHolder
,Lootable
,Metadatable
,PersistentDataHolder
,PersistentDataViewHolder
,TileState
,TileStateInventoryHolder
Represents a captured state of a decorated pot.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the inventory of the block represented by this block state.Deprecated.Get the sherd on the provided side.Gets a Map of all sides on this decorated pot and the sherds on them.Gets the captured inventory snapshot of this container.void
setSherd
(@NotNull DecoratedPot.Side side, @Nullable Material sherd) Set the sherd on the provided side.Methods inherited from interface org.bukkit.inventory.BlockInventoryHolder
getBlock
Methods inherited from interface org.bukkit.block.BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface org.bukkit.loot.Lootable
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Method Details
-
setSherd
Set the sherd on the provided side.- Parameters:
side
- the side to setsherd
- the sherd, or null to set a blank side.- Throws:
IllegalArgumentException
- if the sherd is not either tagged byTag.ITEMS_DECORATED_POT_SHERDS
,Material.BRICK
, ornull
-
getSherd
Get the sherd on the provided side.- Parameters:
side
- the side to get- Returns:
- the sherd on the side or
Material.BRICK
if it's blank
-
getSherds
Gets a Map of all sides on this decorated pot and the sherds on them. If a side does not have a specific sherd on it,Material.BRICK
will be the value of that side.- Returns:
- the sherds
-
getShards
Deprecated.in favor ofgetSherds()
Gets the sherds on this decorated pot. For faces without a specific sherd,Material.BRICK
is used in its place.- Returns:
- the sherds
-
getInventory
Description copied from interface:TileStateInventoryHolder
Gets the inventory of the block represented by this block state.If the block was changed to a different type in the meantime, the returned inventory might no longer be valid.
If this block state is not placed this will return the captured inventory snapshot instead.
- Specified by:
getInventory
in interfaceInventoryHolder
- Specified by:
getInventory
in interfaceTileStateInventoryHolder
- Returns:
- the inventory
-
getSnapshotInventory
Description copied from interface:TileStateInventoryHolder
Gets the captured inventory snapshot of this container.The returned inventory is not linked to any block. Any modifications to the returned inventory will not be applied to the block represented by this block state up until
BlockState.update(boolean, boolean)
has been called.- Specified by:
getSnapshotInventory
in interfaceTileStateInventoryHolder
- Returns:
- the captured inventory snapshot
-
getSherds()