Barrier

A barrier is an invisible block which appears transparent, but has mixed properties. All dependent blocks can be placed on a barrier, such as trapdoors or redstone, however, it lets light through and renders adjacent surfaces. The block in the player's inventory shows up as a red box with a slash through it (commonly referred to as a "No" sign), but when placed is completely see-through (similar to that of air). Like bedrock, end portal frames, and command blocks, it is indestructible, meaning that it can only be destroyed in Creative mode.

In Creative mode, if a player is holding a barrier block in their hand, all placed barrier blocks display a "No" sign, thus becoming visible and allowing the builder to see placed barrier blocks. But once the player switches to another block in their hand, the "No" signs within the barrier blocks disappear, thus rendering the blocks totally invisible again. This effect is client-side, and if a player holds a barrier block in survival, the "No" signs won't show up. They only show in Creative.

Obtaining
Like command blocks, barriers are not listed in the Creative inventory, and can only be obtained using the following command:. Just a note, you can remove the  and use. Barriers are unobtainable in survival mode without cheats, like command blocks and bedrock.

Trivia

 * Barriers cannot be pushed by pistons and can only be destroyed in Creative mode.
 * When a barrier is broken, Block of Redstone particles appear.
 * Unlike Bedrock, Ender Dragons and Withers can destroy barriers.
 * A barrier in the inventory is the second block that uses its respective block ID, but does not display in the inventory as itself (the first being the hopper). Note that this is unlike similar blocks, such as the cauldron, that use a separate item ID.
 * The "No" symbol that shows up when holding the Barrier Block in Creative mode is actually a particle. It can be used via /particle.
 * The Barrier can be an effective tool for invisible walls in adventure maps.