Opacity (and its inverse, transparency) are properties of blocks with a wide range of effects on the game world.
Properties[edit | edit source]
The primary purpose of opacity is to tell the game engine if it needs to draw behind the block; an opaque block completely obscures the view behind it, while a transparent block does not. Thus, transparency applies not only to solid blocks like ice and glass, but also blocks like cacti, stairs, and single slabs, which are not considered full blocks.
Opacity also affects how light propagates through the world. Opaque blocks completely prevent light from traveling through them, while transparent blocks generally diminish the light by one light level per block (these value can be overridden however, and there are several exceptions). By this definition, transparency does not imply that a block is actually see-through, which is a quality of the item texture specified by the game or resource pack.
Effects[edit | edit source]
A lot of the effects of opacity are non-obvious. Minecraft does not have a "solid" property on blocks, so opacity is tested when a test for "solidity" would normally occur.
- Opaque blocks suffocate you, while transparent blocks do not.
- Mobs cannot spawn on transparent blocks, nor can they spawn inside opaque blocks. However, they can spawn inside a non-solid transparent block, such as flowers or redstone wires.
- Chests cannot be opened if there is an opaque block on top of them. They are not affected by transparent blocks.
- Some blocks cannot be placed on transparent blocks. This includes:
Snow layer (excluding full blocks of snow),
Redstone torch), and
- The only exceptions to this are that torches and redstone torches can be placed on the TOP face of glass, and any fixture (which can be placed on the top of a block) can be placed on hoppers.
- Water which is completely surrounded by water or opaque blocks won't have a current. However, if one of the surrounding blocks is transparent the water will flow down like a waterfall, making it much slower to swim up.
- Redstone behavior (see Redstone circuit and its subpages for details):
- Tree leaves can overwrite transparent blocks when they grow, but they will not overwrite opaque blocks.
- Opacity affects door orientation when placed. Doors open counter-clockwise by default, but if they have an opaque wall along their left side they open clockwise.
- Ghast fireball explosions only start fires on opaque blocks.
- A bed can only successfully reset the player's spawn point if the block at its head is opaque.
- Beds with transparent blocks at their heads may still be slept in, but dying will cause the player to respawn at the original spawn point with the message "Your home bed was missing or obstructed."
- Particles that are affected by gravity (e.g. slime particles) will fall through transparent blocks, but will stop on opaque blocks.
- Bats cannot hang on transparent blocks.
On block light[edit | edit source]
- Some transparent blocks can reduce or block light, according to type:
carpet do not reduce the light passing through them, i.e. there is no additional modifier. In other words, light passes through them as if it were air.
ice are transparent, but have a -2 modifier to light propagation, on top of the normal decrease of 1 per block.
Lava is set to completely block light propagation. This is usually unnoticeable since lava has the maximum light level of 15.
cobweb do not have any extra effect on block light, but they do diffuse sky light.
- The light level from sunlight or moonlight is the same in each block of air in the column of air above the highest obstruction in the column. When placed, leaves and cobwebs obstruct that light column so that the lowest air block above the leaves acts as other light sources do.
- As you descend below the leaves, the light level diminishes with distance like it would from other light sources such as torches.
farmland block light completely (except in Pocket Edition).
- For the purposes of most game logic, the light level of the block itself is equal to the maximum light level of any of the blocks directly beside or above it. As a result, if these blocks are lit from the top or sides, they are typically one level brighter than a transparent block would be at the same location.
- When placing a beacon, the beacon will treat water and lava as transparent and will function under it.
- The growth of grass blocks is linked to how well lit the blocks directly above them are. Reducing that light with an opaque block, a partially transparent block or enough transparent blocks will kill a grass block, as well as prevent grass spreading to nearby dirt blocks.
Types of transparent blocks[edit | edit source]
Video[edit | edit source]
Issues[edit | edit source]
Issues relating to “Opacity” are maintained on the issue tracker. Report issues there.
Trivia[edit | edit source]
- In the Nether, your spawn point will always be on top of an opaque block. This is hard to observe, since you warp back to the normal world when you die in the nether.
- If a non-transparent block is given transparent pixels in an edited texture, then instead of showing the block behind it through the transparent part, it will simply fill in the area with white.