Updated:

Test Block: item ID and commands

The ID for Test Block is minecraft:test_block. It is a placeable block, so the same ID works in /give, /setblock and /fill. It was added in Java 1.21.5.

Basic data

NameTest Block
ID (Java Edition)minecraft:test_block
TypeBlock (also an item)
Java versionsJava 1.21.5 and later
Bedrock 26.52Not tested
Stack size64
HardnessUnbreakable

Commands you can copy

Java Edition

Give one

/give @p minecraft:test_block 1

Give a full stack (64)

/give @p minecraft:test_block 64

Place at your feet

/setblock ~ ~ ~ minecraft:test_block

Fill a 5×5 floor

/fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 minecraft:test_block

Remove from inventory

/clear @p minecraft:test_block

Open this command in the Give generator

Bedrock Edition

This ID has not been tested on Bedrock. Check the in-game suggestions before running it.

Block states

StateValuesDefault
modestart, log, fail, acceptstart

Place it with a state

/setblock ~ ~ ~ minecraft:test_block[mode=log]

Bedrock uses different state names and syntax (for example ["facing_direction"=2]).

Version notes

It was added in Java 1.21.5. Older versions report that the ID is unknown.

Java 1.20.5 and later write extra item data in [ ] (components); 1.20.4 and earlier use { } (NBT). A plain /give with only the ID is the same in both.

Questions

What is the ID for Test Block?

It is minecraft:test_block. In commands you can also write test_block without minecraft:.

Why does the command turn red?

The ID is misspelled, or it does not exist in that version yet. Test Block works in Java 1.21.5 and later. The Command Error Doctor can check it.

Related IDs