Uses of Interface
org.bukkit.block.data.BlockData
Package
Description
The root package of the Bukkit API, contains generalized API classes.
Classes used to manipulate the voxels in a
world
,
including special states.Generalized BlockData classes.
Specific BlockData classes relevant to only a given block or set of blocks.
Interfaces for non-voxel objects that can exist in a
world
, including all players, monsters, projectiles, etc.Classes to facilitate
world
generation
implementation.Classes involved in manipulating player inventories and item interactions.
The interfaces used when manipulating extra data can can be stored inside
item stacks
.-
Uses of BlockData in com.destroystokyo.paper
-
Uses of BlockData in com.destroystokyo.paper.event.block
Modifier and TypeMethodDescriptionBlockDestroyEvent.getEffectBlock()
Get the effect that will be played when the block is broken.BlockDestroyEvent.getNewState()
Modifier and TypeMethodDescriptionGet damaged state by block datavoid
BlockDestroyEvent.setEffectBlock
(@NotNull BlockData effectBlock) Sets the effect that will be played when the block is broken.ModifierConstructorDescriptionAnvilDamagedEvent
(@NotNull InventoryView inventory, @Nullable BlockData blockData) BlockDestroyEvent
(@NotNull Block block, @NotNull BlockData newState, @NotNull BlockData effectBlock, int xp, boolean willDrop) -
Uses of BlockData in io.papermc.paper.block
Modifier and TypeMethodDescriptionMovingPiston.getMovingBlock()
Gets the block that is being pushed -
Uses of BlockData in org.bukkit
Modifier and TypeMethodDescriptionBukkit.createBlockData
(@NotNull String data) Creates a newBlockData
instance with material and properties parsed from provided data.Bukkit.createBlockData
(@NotNull Material material) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Bukkit.createBlockData
(@Nullable Material material, @Nullable String data) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults, except for those provided in data.Material.createBlockData()
Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults.Material.createBlockData
(@Nullable String data) Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults, except for those provided in data.Material.createBlockData
(@Nullable Consumer<? super BlockData> consumer) Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults.Server.createBlockData
(@NotNull String data) Creates a newBlockData
instance with material and properties parsed from provided data.Server.createBlockData
(@NotNull Material material) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Server.createBlockData
(@Nullable Material material, @Nullable String data) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults, except for those provided in data.UnsafeValues.fromLegacy
(Material material, byte data) Deprecated.BlockChangeDelegate.getBlockData
(int x, int y, int z) Get the block data at the location.ChunkSnapshot.getBlockData
(int x, int y, int z) Get block data for block at corresponding coordinate in the chunkRegionAccessor.getBlockData
(int x, int y, int z) Gets theBlockData
at the given coordinates.RegionAccessor.getBlockData
(@NotNull Location location) Modifier and TypeMethodDescriptionboolean
Tests if this chunk contains the specified block.boolean
Tests if this snapshot contains the specified block.boolean
BlockChangeDelegate.setBlockData
(int x, int y, int z, @NotNull BlockData blockData) Set a block data at the specified coordinates.void
RegionAccessor.setBlockData
(int x, int y, int z, @NotNull BlockData blockData) Sets theBlockData
at the given coordinates.void
RegionAccessor.setBlockData
(@NotNull Location location, @NotNull BlockData blockData) World.spawnFallingBlock
(@NotNull Location location, @NotNull BlockData data) Deprecated.Modifier and TypeMethodDescriptionCreates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Material.createBlockData
(@Nullable Consumer<? super BlockData> consumer) Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults. -
Uses of BlockData in org.bukkit.block
Modifier and TypeMethodDescriptionBlock.getBlockData()
Gets the complete block data for this blockBlockState.getBlockData()
Gets the data for this block state.Modifier and TypeMethodDescriptionboolean
Checks if this block is a valid placement location for the specified block data.void
Block.setBlockData
(@NotNull BlockData data) Sets the complete data for this blockvoid
Block.setBlockData
(@NotNull BlockData data, boolean applyPhysics) Sets the complete data for this block
Note that applyPhysics = false is not in general safe.void
BlockState.setBlockData
(@NotNull BlockData data) Sets the data for this block state. -
Uses of BlockData in org.bukkit.block.data
Modifier and TypeInterfaceDescriptioninterface
'age' represents the different growth stages that a crop-like block can go through.interface
'power' represents the redstone power level currently being emitted or transmitted via this block.interface
'attached' denotes whether a tripwire hook or string forms a complete tripwire circuit and is ready to trigger.interface
'half' denotes which half of a two block tall material this block is.interface
'dusted' represents how far uncovered by brush the block is.interface
'facing' represents the face towards which the block is pointing.interface
'face' represents the face to which a lever or button is stuck.interface
'hanging' denotes whether the lantern is hanging from a block.interface
'hatch' is the number of entities which may hatch from these eggs.interface
'level' represents the amount of fluid contained within this block, either by itself or inside a cauldron.interface
'lit' denotes whether this block (either a redstone torch or furnace) is currently lit - that is not burned out.interface
This class encompasses the 'north', 'east', 'south', 'west', 'up', 'down' boolean flags which are used to set which faces of the block textures are displayed on.interface
'open' denotes whether this block is currently opened.interface
'axis' represents the axis along whilst this block is oriented.interface
'powered' indicates whether this block is in the powered state or not, i.e.interface
'shape' represents the current layout of a minecart rail.interface
'rotation' represents the current rotation of this block.interface
'snowy' denotes whether this block has a snow covered side and top texture (normally because the block above is snow).interface
'waterlogged' denotes whether this block has fluid in it.Modifier and TypeMethodDescriptionBlockData.clone()
Returns a copy of this BlockData.Merges all explicitly set states from the given data with this BlockData. -
Uses of BlockData in org.bukkit.block.data.type
Modifier and TypeInterfaceDescriptioninterface
interface
'leaves' represents the size of the leaves on this bamboo block.interface
interface
Similar toBisected
, 'part' denotes which half of the bed this block corresponds to.interface
'honey_level' represents the amount of honey stored in the hive.interface
'attachment' denotes how the bell is attached to its block.interface
'tilt' indicates how far the leaf is tilted.interface
Interface to the 'has_bottle_0', 'has_bottle_1', 'has_bottle_2' flags on a brewing stand which indicate which bottles are rendered on the outside.interface
'drag' indicates whether a force will be applied on entities moving through this block.interface
'bites' represents the amount of bites which have been taken from this slice of cake.interface
interface
'signal_fire' denotes whether the fire is extra smokey due to having a hay bale placed beneath it.interface
'candles' represents the number of candles which are present.interface
interface
'berries' indicates whether the block has berries.interface
interface
'type' represents which part of a double chest this block is, or if it is a single chest.interface
Interface to the 'slot_0_occupied', 'slow_1_occupied' ...interface
interface
'conditional' denotes whether this command block is conditional or not, i.e.interface
'mode' indicates what mode this comparator will operate in.interface
interface
interface
'orientation' is the direction the block is facing.interface
'inverted' denotes whether this daylight detector is in the inverted mode, i.e.interface
interface
Similar toPowerable
, 'triggered' indicates whether or not the dispenser is currently activated.interface
'hinge' indicates which hinge this door is attached to and will rotate around when opened.interface
interface
interface
'eye' denotes whether this end portal frame has been activated by having an eye of ender placed in it.interface
The 'moisture' level of farmland indicates how close it is to a water source (if any).interface
interface
md_5's mixtape.interface
interface
'in_wall' indicates if the fence gate is attached to a wall, and if true the texture is lowered by a small amount to blend in better.interface
interface
interface
interface
interface
Similar toPowerable
, 'enabled' indicates whether or not the hopper is currently activated.interface
'orientation' is the direction the block is facing.interface
'has_record' is a quick flag to check whether this jukebox has a record inside it.interface
interface
interface
'persistent' indicates whether or not leaves will be checked by the server to see if they are subject to decay or not.interface
'has_book' is a quick flag to check whether this lectern has a book inside it.interface
interface
interface
interface
'instrument' is the type of sound made when this note block is activated.interface
interface
'flower_amount' represents the number of petals.interface
'extended' denotes whether the piston head is currently extended or not.interface
'short' denotes this piston head is shorter than the usual amount because it is currently retracting.interface
interface
'thickness' represents the dripstone thickness.interface
A type of minecart rail which interacts with redstone in one way or another.interface
interface
'north', 'east', 'south', 'west' represent the types of connections this redstone wire has to adjacent blocks.interface
'delay' is the propagation delay of a repeater, i.e.interface
'charges' represents the amount of times the anchor may still be used.interface
'stage' represents the growth stage of a sapling.interface
'bottom' indicates whether the scaffolding is floating or not.interface
'bloom' indicates whether the sculk catalyst is actively spreading the sculk or not.interface
'sculk_sensor_phase' indicates the current operational phase of the sensor.interface
'can_summon' indicates whether the sculk shrieker can summon the warden.interface
interface
'pickles' indicates the number of pickles in this block.interface
interface
'type' represents what state the slab is in - either top, bottom, or a double slab occupying the full block.interface
interface
'layers' represents the amount of layers of snow which are present in this block.interface
'shape' represents the texture and bounding box shape of these stairs.interface
'mode' represents the different modes in which this structure block may operate.interface
interface
'type' represents the type of piston which this (technical) block corresponds to.interface
'unstable' indicates whether this TNT will explode on punching.interface
interface
'trial_spawner_state' indicates the current operational phase of the spawner.interface
'disarmed' denotes that the tripwire was broken with shears and will not subsequently produce a current when destroyed.interface
interface
'eggs' is the number of eggs which appear in this block.interface
This class encompasses the 'north', 'east', 'south', 'west', height flags which are used to set the height of a wall.interface
interface
-
Uses of BlockData in org.bukkit.entity
Modifier and TypeMethodDescriptionBlockDisplay.getBlock()
Gets the displayed block.FallingBlock.getBlockData()
Get the data for the falling blockTNTPrimed.getBlockData()
Gets the visual block data of this primed tnt.Enderman.getCarriedBlock()
Gets the data of the block that the Enderman is carrying.Minecart.getDisplayBlockData()
Gets the display block for this minecart.Modifier and TypeMethodDescriptionvoid
Player.sendBlockChange
(@NotNull Location loc, @NotNull BlockData block) Send a block change.void
Sets the displayed block.void
FallingBlock.setBlockData
(@NotNull BlockData blockData) Sets the data for the falling block.void
TNTPrimed.setBlockData
(BlockData data) Sets the visual block data of this primed tnt.void
Enderman.setCarriedBlock
(@Nullable BlockData blockData) Sets the data of the block that the Enderman is carrying.void
Minecart.setDisplayBlockData
(@Nullable BlockData blockData) Sets the display block for this minecart.Modifier and TypeMethodDescriptionvoid
Player.sendMultiBlockChange
(@NotNull Map<? extends Position, BlockData> blockChanges) Send multiple block changes.default void
Player.sendMultiBlockChange
(@NotNull Map<? extends Position, BlockData> blockChanges, boolean suppressLightUpdates) Deprecated.suppressLightUpdates is no longer available in 1.20+, usePlayer.sendMultiBlockChange(Map)
-
Uses of BlockData in org.bukkit.event.block
Modifier and TypeMethodDescriptionBlockCanBuildEvent.getBlockData()
Gets the BlockData that we are trying to place.BlockPhysicsEvent.getChangedBlockData()
Gets the BlockData of the block that changed, causing this event.FluidLevelChangeEvent.getNewData()
Gets the new data of the changed block.Modifier and TypeMethodDescriptionvoid
FluidLevelChangeEvent.setNewData
(@NotNull BlockData newData) Sets the new data of the changed block.ModifierConstructorDescriptionBlockCanBuildEvent
(@NotNull Block block, @NotNull BlockData type, boolean canBuild) Deprecated.BlockCanBuildEvent
(@NotNull Block block, @Nullable Player player, @NotNull BlockData type, boolean canBuild) Deprecated.BlockCanBuildEvent
(@NotNull Block block, @Nullable Player player, @NotNull BlockData type, boolean canBuild, EquipmentSlot hand) BlockPhysicsEvent
(@NotNull Block block, @NotNull BlockData changed) BlockPhysicsEvent
(Block block, BlockData changed, int sourceX, int sourceY, int sourceZ) Deprecated.FluidLevelChangeEvent
(@NotNull Block theBlock, @NotNull BlockData newData) -
Uses of BlockData in org.bukkit.event.entity
Modifier and TypeMethodDescriptionEntityChangeBlockEvent.getBlockData()
Gets the data for the block that would be changed intoModifierConstructorDescriptionEntityBreakDoorEvent
(@NotNull LivingEntity entity, @NotNull Block targetBlock, BlockData to) -
Uses of BlockData in org.bukkit.generator
Modifier and TypeMethodDescriptionChunkGenerator.ChunkData.getBlockData
(int x, int y, int z) Get the type and data of the block at x, y, z.LimitedRegion.getBlockData
(@NotNull Vector vector) Gets theBlockData
of the block at the provided coordinates.Modifier and TypeMethodDescriptionvoid
Set the block at x,y,z in the chunk data to material.default void
LimitedRegion.setBlockData
(@NotNull Vector vector, @NotNull BlockData data) Sets the block at a vector location to the providedBlockData
.void
ChunkGenerator.ChunkData.setRegion
(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull BlockData blockData) Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. -
Uses of BlockData in org.bukkit.inventory
Modifier and TypeMethodDescriptionItemStack.getBlockData
(@NotNull Material material) Returns the currently attached block data for this item or creates a new one if one doesn't exist.Modifier and TypeMethodDescriptionvoid
ItemStack.setBlockData
(@NotNull BlockData blockData) Attaches a copy of the passed block data to the item. -
Uses of BlockData in org.bukkit.inventory.meta
Modifier and TypeMethodDescriptionBlockDataMeta.getBlockData
(@NotNull Material material) Returns the currently attached block data for this item or creates a new one if one doesn't exist.Modifier and TypeMethodDescriptionvoid
BlockDataMeta.setBlockData
(@NotNull BlockData blockData) Attaches a copy of the passed block data to the item.
RegionAccessor.spawn(Location, Class, Consumer)
(or a variation thereof) in combination withFallingBlock.setBlockData(BlockData)