본문으로 건너뛰기
MC COMMANDS logoMC COMMANDS
명령어 참조

Minecraft /setblock Command

world자바 에디션베드락 에디션

Changes a single block at specified coordinates to a new block type, with optional block state properties and replacement modes.

버전 호환성

자바 에디션:1.21.4 (1.13+)
베드락 에디션:1.21.60

명령어 문법

자바 에디션/setblock <pos> <block>[<states>] [destroy|keep|replace]
베드락 에디션/setblock <position> <tileName> [tileData|blockStates] [replace|destroy|keep]

인수 설명

실용적인 예시

beginner모든 에디션
/setblock ~ ~-1 ~ minecraft:redstone_block replace

Places a redstone block beneath your feet to activate redstone mechanisms.

Activating hidden redstone circuits.

advanced자바 에디션
/setblock 100 64 -200 minecraft:chest[facing=south]{Items:[{Slot:0b,id:"minecraft:diamond",count:3}]} replace

Java: Places a chest facing South containing 3 diamonds in the first slot.

Procedural treasure chest generation.

beginner모든 에디션
/setblock ~ ~1 ~ minecraft:campfire[lit=true] keep

Places a lit campfire above you only if the block above is currently empty air.

Safe camp setup.

beginner모든 에디션
/setblock ~ ~-1 ~ minecraft:air destroy

Breaks the block beneath you with block break particles and drops the item.

Pitfall trap activation.

Advertisement

자주 발생하는 실수

실수:

Using keep mode on a non-air block, causing the command to fail silently

해결 방법:

Use "replace" mode if you want to overwrite existing blocks regardless of what is there.

실수:

Using destroy mode on container blocks, scattering items everywhere and causing lag

해결 방법:

Use "replace" mode with air: /setblock ~ ~ ~ air replace

실수:

Placing directional blocks (doors, pistons, stairs) without specifying facing states

해결 방법:

Include the facing state: /setblock ~ ~ ~ minecraft:piston[facing=up]

Command Block Usage & Automation

Widely used as a "wireless redstone" transmitter. A command block at location A runs "/setblock 50 64 50 minecraft:redstone_block" to instantly power redstone wire at location B across any distance in loaded chunks, and another block later removes it with "/setblock 50 64 50 minecraft:air".

Automation Tip: Command blocks require Operator permissions (permission level 2+) and cheats enabled. In Java Edition, command blocks can execute commands up to 32,767 characters long compared to the 256-character player chat limit.

유용한 팁

  • In Java Edition, check the F3 debug screen target block info to inspect all valid block states before writing commands.

  • Placing water or lava with /setblock places a source block instantly without fluid physics updates if tick freeze is on.

중요 참고사항

Unlike /fill, /setblock targets exactly one block. In Java Edition, you can attach block entity NBT in curly braces (like chest inventories, banner patterns, or sign text) directly to the command.

자주 묻는 질문

관련 명령어

명령어를 만들 준비가 되셨나요?

인터랙티브 생성기를 사용하여 오류 없이 /setblock 명령어를 시각적으로 만들어보세요.

명령어 생성기 열기
Advertisement