Comandos / setblock

Quien soy
Alejandra Rangel
@alejandrarangel
Autor y referencias

setblock
Nivel de permiso
son requeridos

2‌ [solo JE]
1‌ [BE únicamente]


Restricciones

Solo trampa‌ [solo BE]

Cambia un bloque a otro bloque.

  • 1 Sintaxis
  • 2 Argumentos
  • 3 Resultado
  • salida 4
  • 5 Ejemplos
  • 6
  • Historia de 7

Sintaxis

  • Edición Java
setblock <pos> <block> [destroy|keep|replace]
  • Edición Bedrock
setblock <position: x y z> <tileName: Block> [tileData: int] [destroy|keep|replace] setblock <position: x y z> <tileName: Block> [blockStates: block states] [destroy|keep|replace]

Argumentos

USTED: : block_pos
BE: position: x y z: CommandPosition


Specifies the position of the block to be changed. In Java Edition, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, it must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.

JE: : block_state
BE: tileName: Block: Block


Specifies the new block. In Java Edition, it must be in form of block_id[block_states]{data_tags}(does not accept block tags), in which block states and data tags can be omitted when they are not needed. In Bedrock Edition, it must be a block id.

BE: tileData: int: int

Specifies the block data to use for the new block. Values that are invalid for the specified block id revert to 0. If not specified, defaults to 0. Must be a 32-bit integer number. It must be between 0 and 65535 (inclusive).

BE: blockStates: estados de bloque: BlockStateCommandParam


Especifica los estados del bloque que se utilizarán para el bloque. Debe ser un argumento de blockstate como [" ": , " ": , ...]. Por ejemplo: ["old_leaf_type": "abedul", "persistent_bit": verdadero].

destroy|keep|replace

Specifies how to handle the block change. Must be one of:
  • destroy — The old block drops both itself and its contents (as if destroyed by a player). Plays the appropriate block breaking noise.
  • keep — Only air blocks are changed (non-air blocks are unchanged).
  • replace — The old block drops neither itself nor any contents. Plays no sound.
Si no se especifica, se reemplaza por defecto.

Resultado

ComandoDesencadenarEdición JavaEdición Bedrock
cualquierlos argumentos no están especificados correctamente Insuperable Fallidos
specified position is unloaded or out of the world Fallidos
try to place block in Debug mode N/A
/setblock ... keeptry to change a non-air block Fallidos
/setblock ... keep
/setblock ... replace
try to replace a block with an identical copy (ignoring the block entity)
cualquierSobre el éxitoChanges blocks at the specified position.

Salida


ComandoEdiciónSituaciónRecuento de éxitos/ ejecutar el éxito de la tienda .../ ejecutar el resultado de la tienda ...
cualquierEdición JavaAl fallar000
Sobre el éxito111
Edición BedrockAl fallar0N/AN/A
Sobre el éxito1N/AN/A

Ejemplos

  • Put a chest facing east at your feet
    • setblock ~ ~ ~ chest[facing=east]‌[Java Edition only]
    • setblock ~ ~ ~ chest ["facing_direction":5]‌[Bedrock Edition only]
  • Place a sign next to it in Java Edition
    • setblock ~ ~ ~-1 birch_sign{Text1:'"My chest"',Text2:'"Do not open!"'} (Note the two sets of quotes around the text. They are required.)
  • Put a top quartz slab at the top of your head
    • setblock ~ ~2 ~ quartz_slab[type=top]‌[Java Edition only]
    • setblock ~ ~2 ~ stone_slab ["stone_slab_type":"quartz","top_slot_bit":true]‌[Bedrock Edition only]

  • /data — modifies the data tags of a block or entity
  • /clone — copies blocks from one region to another
  • /fill — fills a region with a block

Historia

Edición Java
1.7.213w37aAdded /setblock.
1.1116w32aAdded block state support to /setblock.
Edición de bolsillo Alpha
v0.16.0construir 1Added /setblock.
Edición Bedrock
1.16.210beta 1.16.210.53Added block state support to /setblock.
Ver en: Plantilla: Comandos / contenido [editar]

Añade un comentario de Comandos / setblock
¡Comentario enviado con éxito! Lo revisaremos en las próximas horas.