Package org.bukkit.block
Interface TileState
-
- All Superinterfaces:
BlockState
,Metadatable
,PersistentDataHolder
- All Known Subinterfaces:
Banner
,Barrel
,Beacon
,Bed
,Bell
,BlastFurnace
,BrewingStand
,Campfire
,Chest
,CommandBlock
,Comparator
,Conduit
,Container
,CreatureSpawner
,DaylightDetector
,Dispenser
,Dropper
,EnchantingTable
,EnderChest
,EndGateway
,Furnace
,Hopper
,Jigsaw
,Jukebox
,Lectern
,ShulkerBox
,Sign
,Skull
,Smoker
,Structure
public interface TileState extends BlockState, PersistentDataHolder
Represents a block state that also hosts a tile entity at the given location. This interface alone is merely a marker that does not provide any data. Data about the tile entities is provided by the respective interface for each tile entity type. After modifying the data provided by a TileState,BlockState.update()
needs to be called to store the data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PersistentDataContainer
getPersistentDataContainer()
Returns a custom tag container capable of storing tags on the object.-
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
-
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
-
-
-
Method Detail
-
getPersistentDataContainer
@NotNull PersistentDataContainer getPersistentDataContainer()
Returns a custom tag container capable of storing tags on the object. Note that the tags stored on this container are all stored under their own custom namespace therefore modifying default tags using thisPersistentDataHolder
is impossible.This
PersistentDataHolder
is only linked to the snapshot instance stored by theBlockState
. When storing changes on thePersistentDataHolder
, the updated content will only be applied to the actual tile entity after one of theBlockState.update()
methods is called.- Specified by:
getPersistentDataContainer
in interfacePersistentDataHolder
- Returns:
- the custom tag container
-
-