BARRIER BLOCKS
Barrier blocks are solid and transparent, but also completely invisible. They also can’t be broken – or even seen! – in Survival mode. It’s impossible for players or mobs to get past them, and they’re only visible while you have barrier blocks selected in the inventory, at which point they take on the appearance of a circular red sign with a slash through it which always faces the player.
Barriers will not interact with non-player blocks – they let arrows, fireballs, rain and potions through, and don’t connect to fences, gates or walls. This makes them useful for penning people in when designing multiplayer or adventure maps – you can put a wall of barrier blocks around certain areas so that you can stop players wandering in the wrong direction or walking out of the playing area.
You can also use barriers to block off doorways that shouldn’t be opened, orinvisible walkway in a place where they won’t be accidentally discovered!