Before diving into version-specific details, let's clarify the mechanics. A standard Minecraft texture pack (or resource pack) changes the appearance of blocks. An X-ray pack, however, exploits a specific rendering flaw or feature: transparency.
In vanilla Minecraft, stone, dirt, and deepslate are opaque. An X-ray pack replaces the textures of these common, boring blocks with transparent or semi-transparent images. Meanwhile, valuable ores (Diamond, Emerald, Gold, Iron, Redstone, Lapis Lazuli) and key structures (Mineshafts, Dungeons, Strongholds) are left with bright, solid, full-color textures. The result? You look at a mountainside and see straight through the rock, revealing every single ore vein as if it were painted on a glass wall. minecraft 1.12 xray texture pack
If you like the concept of X-ray but don't want to cheat, look for "Ore Border" or "Ore Highlighter" resource packs for 1.12. These do not make stone transparent. Instead, they add a bright colored border around ores only when they are exposed to air. This means you still have to dig and discover caves naturally, but once you find a ravine, you can clearly see diamonds on the wall without squinting. It is widely considered "not cheating" on most PvE servers. In vanilla Minecraft, stone, dirt, and deepslate are opaque
You might ask, "Why not use a 1.20 or 1.21 Xray?" The answer lies in two factors: The result