Barrier
Block

Barrier

Namespaced ID
minecraft:barrier
Legacy numeric ID
166(1.8 & earlier)
Stack size
64
Edition
Java & Bedrock

/give command

Run in chat or a command block. Replace @p with a player name to target someone specific.

Command builder

Set the count, custom name, lore, and enchantments to generate a ready-to-paste /give command for Barrier.

Shown above the item in the inventory.
Italic text shown below the item name. One line per row.
1 compatible with Barrier.

Component syntax for Minecraft 1.21.8.

Block properties

Hardness
-1
Blast resistance
3600000.8
Material
default
Diggable
No
Transparent
Yes
Light emitted
0 / 15
Light filtered
0 / 15
Block state IDs
11254 – 11255

Across versions

Legacy numeric ID
166 (pre-1.13, from 1.8)
Modern ID (1.13+)
minecraft:barrier (numeric IDs were removed in 1.13 — not usable in commands)
Editions
Java & Bedrock

Browse the full item list for a specific version:

About Barrier

What is the Minecraft ID for Barrier?

The namespaced ID is minecraft:barrier, used in the /give command: /give @p minecraft:barrier 1. In legacy versions before 1.13, Barrier used the numeric ID 166. Numeric item IDs were removed in the 1.13 "Flattening" and no longer work in modern commands.