/setblock
Command
Changes a block to another block.
Permission Level | Game Directors |
---|---|
Requires Cheats? | Yes |
Usage
Set block, tile data
/setblock <position: x y z> <tileName: Block> <blockStates: block properties> [oldBlockHandling: SetBlockMode]
Set a block
in a position
using tile name
with optional tile data
and old block handling
fill methods.
Set block, block states
/setblock <position: x y z> <tileName: Block> [oldBlockHandling: SetBlockMode]
Set a block
in a position
using tile name
with optional block states
and old block handling
fill methods.
Arguments
blockStates
: block properties The block states from theenum
to use for the block to be set.oldBlockHandling
: SetBlockMode Anenum
of typedestroy
,hollow
,keep
,outline
, orreplace
. Default:replace
.position: x y z
: position Avector
[x y z] that defines the position of the block to change.tileName
: Block An block name from theenum
that specifies the new block.
Enums
SetBlockMode
Enum of Set Block Modes
Values
replace
Replacedestroy
Destroykeep
Keep
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for