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

Minecraft /data Command

developer자바 전용

Inspects, modifies, merges, or removes NBT data on block entities, non-player entities, and persistent command storage.

버전 호환성

자바 에디션:1.21.4 (1.13+)

명령어 문법

자바 에디션/data get (block|entity|storage) ... | /data merge (block|entity|storage) ... | /data modify (block|entity|storage) ... | /data remove (block|entity|storage) ...

인수 설명

실용적인 예시

beginner자바 에디션
/data get entity @e[type=zombie,limit=1] Health

Reads and prints the current health value of the nearest zombie.

Entity inspection.

intermediate자바 에디션
/data merge entity @e[type=creeper,limit=1] {powered:1b,ExplosionRadius:10}

Merges NBT to charge a creeper and increase its blast radius.

Live entity modification.

advanced자바 에디션
/data modify block ~ ~-1 ~ Items[0].count set value 64

Modifies the chest below you, setting the first item slot count to 64.

Container manipulation.

advanced자바 에디션
/data modify storage rpg:quest State set value "completed"

Sets a persistent global variable in command storage.

Datapack global state management.

Advertisement

자주 발생하는 실수

실수:

Attempting to modify player data (/data modify entity @s ...)

해결 방법:

Player data is read-only. You can read player data with /data get, but must modify players via scoreboards, /item, or /attribute.

실수:

Targeting multiple entities without limit=1

해결 방법:

/data strictly requires a single target entity. Always append limit=1 to selectors: @e[type=zombie,limit=1]

실수:

Trying to run /data on Bedrock Edition

해결 방법:

/data is exclusive to Java Edition. Bedrock requires the Scripting API.

Command Block Usage & Automation

In technical maps and datapacks, /data is the core state management engine. Store complex variables in "storage namespace:data", dynamically update display entities or sign text, or read mob attributes into scoreboards using "/execute store result score @p BossHP run data get entity @e[type=wither,limit=1] Health".

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.

유용한 팁

  • Command storage (/data modify storage ...) persists across game restarts and dimension boundaries without needing physical chunk loading.

  • Use /data get entity @s SelectedItem to inspect the exact component structure of whatever item you are holding.

중요 참고사항

Exclusive to Java Edition. By design, Minecraft prohibits using /data to modify player data directly (to avoid player desync and inventory corruption). Use /item or /scoreboard to interact with player states.

자주 묻는 질문

Advertisement