About Barrier in Minecraft
The barrier is an invisible, indestructible block used by map makers to wall off areas without affecting the view. It is only obtainable through commands and visible when held in Creative.
Barrier Command Examples
- Give 1 to nearest player:
/give @p minecraft:barrier 1 - Give 1 to yourself:
/give @s minecraft:barrier 1 - Give to a specific player:
/give PlayerName minecraft:barrier 1 - Clear from inventory:
/clear @p minecraft:barrier
Barrier FAQ
What is the item ID for Barrier?
The item ID for Barrier is minecraft:barrier. Java Edition commands such as /give, /clear, and /setblock use this namespaced ID.
What is the numerical ID for Barrier?
Barrier has the historical numerical ID 166, used in Java Edition 1.12.2 and earlier. Current versions use minecraft:barrier instead.
How do I give myself Barrier in Minecraft?
Open the chat window and run /give @p minecraft:barrier 1 to give the nearest player one Barrier. Replace @p with a player name to target someone else.
How many Barrier can stack in one slot?
Barrier stacks up to 64 per inventory slot.
Sources and Data Review
Item facts were reviewed for Java Edition 1.21.11 on .
