All commands
🧬
Advanced

/data

View or change the hidden NBT data of entities and blocks.

Try in Simulator

At a glance

Syntax

Syntax
/data get entity <target> [path]
commandtargetcoordsvaluerequiredoptional

See it

What it does

/
Command executed

Anatomy

Every part, explained

  1. 1
    /dataCommandRequired

    Gets, merges, or modifies NBT.

  2. 2
    getActionRequired

    Use get, merge, modify, or remove.

  3. 3
    entity <target>SourceRequired

    An entity, block, or storage.

  4. 4
    [path]NBT pathOptional

    A specific value to read.

Your turn

Try it yourself

Playground
4 tokens · press Enter to run

Copy & paste

Examples

/data get entity @s

Show all of your NBT.

/data get entity @s Health

Read your current health.

/data merge entity @s {NoGravity:1b}

Disable your gravity.

Avoid these

Common mistakes

/data get @s
/data get entity @s

Say the source type: entity, block, or storage.

/data entity @s get
/data get entity @s

The action comes before the source.

Keep going

Related commands