Glass

Glass is a transparent solid block that can be dyed into stained glass, or crafted into tinted glass.

Breaking
Glass drops itself only if it is broken with a tool enchanted with Silk Touch. Otherwise, it drops nothing.

Glass does not have an assigned tool; it is mined at the same speed regardless of what tool is used.

Natural generation
A secret room containing glass can be found inside woodland mansions. Glass is also generated in ancient cities.
 * Glass

Magenta stained glass blocks naturally generate as windows in end cities.
 * Stained glass

Trading
Journeyman-level librarian villagers have a 50% chance to sell 4 glass for 1 emerald.

Journeyman-level librarian villagers have a $2/3$ chance to sell 4 glass for 1 emerald.

Usage
Glass blocks adjacent to other glass blocks are invisible when viewed through glass.

Mobs cannot normally spawn on glass blocks. An exception to this is zombie reinforcements, which can spawn on glass blocks (but not glass panes).

Glass blocks cannot be seen through by mobs, as they treat them as completely opaque. Mobs may look at players through glass, but this is purely visual.

Redstone dust and components can be placed on glass, but cannot power glass. Glass can't cut vertical redstone. Vertical redstone can be placed on glass. $$, it transmits redstone signals up, not down. Otherwise, glass in redstone circuits is functionally the same as an upside-down slab.

Beacon beam color
The color of the beam may be changed by placing blocks of stained glass (or stained glass panes) anywhere above the beacon block. The beam changes colors according to the colors of glass placed above it: the first block sets the beam color, while each additional block sets the color by averaging the red, green, and blue components of the current beam color and the block's color. The color values are the same as those for the corresponding dye. This also works using hardened stained glass and hardened stained glass panes. Stained glass panes have the same effect on the beam as stained glass blocks.

The resulting beam color can be found as $$C = \frac{1}{2^{n+1}}\left(c_0 + \sum_{i=1}^n{2^{i-1}c_i}\right)$$where $$c_i$$ is the sequence of glass colors ($$c_0$$ corresponds to the lowest block and $$c_n$$ to the highest one).

As the blending algorithm is considerably simpler than that of leather-dyeing, a much larger part of the sRGB space is available. A player may experiment with stacking glass, although programs that calculate combinations are also available.

With only 15 types of glass you can make all colors, for example; red + white stained glass above a beacon will be pink, the more white you add, the lighter the color will be.

ID




Trivia

 * Prior to the addition of stained glass to the game, there was a similar block named tinted glass added to Java Edition 2.0. The texture for this tinted glass block was used for the implementation of stained glass in 13w41a before it was replaced with a smoother/transparent texture in 13w42a.
 * The iteration of tinted glass from Java Edition 2.0 shares its name with the tinted glass block added in 1.17, though it is unlikely that the identical naming of these blocks was intentional.
 * The textures of stained glass and stained glass panes still use their original colors from prior to the 1.12 World of Color update. The texture colors were not changed in 1.12's development, and the retexturing in 1.14 did not adjust the colors to the new 1.12 color palette.