Package org.bukkit.block
Interface TileState
- All Superinterfaces:
BlockState
,Metadatable
,PersistentDataHolder
- All Known Subinterfaces:
Banner
,Barrel
,Beacon
,Bed
,Beehive
,Bell
,BlastFurnace
,BrewingStand
,BrushableBlock
,CalibratedSculkSensor
,Campfire
,Chest
,ChiseledBookshelf
,CommandBlock
,Comparator
,Conduit
,Container
,Crafter
,CreakingHeart
,CreatureSpawner
,DaylightDetector
,DecoratedPot
,Dispenser
,Dropper
,EnchantingTable
,EnderChest
,EndGateway
,EntityBlockStorage<T>
,Furnace
,HangingSign
,Hopper
,Jigsaw
,Jukebox
,Lectern
,SculkCatalyst
,SculkSensor
,SculkShrieker
,ShulkerBox
,Sign
,Skull
,Smoker
,Structure
,SuspiciousSand
,TrialSpawner
,Vault
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
Modifier and TypeMethodDescriptionReturns a custom tag container capable of storing tags on the object.Methods inherited from interface org.bukkit.block.BlockState
copy, copy, 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 Details
-
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
-