How to xray in Minecraft is a technique that lets you see through solid blocks to locate ores, structures, and hidden bases, and can even help you spot the exact buried treasure depth in Minecraft. The two main methods are using an X-ray texture pack or an X-ray mod, each with its own installation steps.
What is an X-ray in Minecraft?
An X-ray in Minecraft is a method that allows players to see through solid blocks to locate valuable resources like ores, or hidden structures and bases. The primary methods to achieve X-ray vision are through X-ray texture packs (also known as resource packs) or X-ray mods. If you want to find diamonds faster without digging randomly, this technique gives you a direct line of sight to what lies beneath, but you still need to know the diamond level in Minecraft to focus your search in the right layers.
How to xray in Minecraft with a texture pack
X-ray texture packs function by replacing the textures of common blocks, such as stone, deepslate, dirt, and netherrack, to make them transparent or invisible, while keeping valuable ores and other specific blocks visible and often highlighted. This is the most common method because it is simple and compatible with all editions. If you want to see exactly where each ore vein is without changing the game code, a texture pack is the way to go.
To install an X-ray texture pack in Minecraft Java Edition:
- Download the
.zipfile of the pack from a trusted source. - Launch Minecraft and navigate to "Options" from the main menu, then select "Resource Packs...".
- Click "Open Pack Folder" to reveal the
resourcepacksdirectory. - Drag the downloaded X-ray texture pack
.zipfile into the openedresourcepacksfolder. - Close and reopen the resource packs menu in Minecraft to activate it.
X-ray texture packs are compatible with all Minecraft editions, including Java Edition and Bedrock Edition (MCPE). For Minecraft Bedrock Edition, X-ray texture packs can sometimes be obtained for free or purchased through the Minecraft Marketplace.
How to xray in Minecraft with a mod
X-ray mods are typically used in Minecraft Java Edition and require a compatible mod loader such as Forge, Fabric, Quilt, or NeoForge, matching your Minecraft version. If you want a toggleable X-ray that you can turn on and off with a single key press, a mod offers more control than a texture pack.
To install an X-ray mod:
- Download the mod's
.jarfile from a trusted source like CurseForge. - Place it into your
.minecraft/modsfolder. - Launch Minecraft using the profile associated with your installed mod loader.
X-ray glitches: a temporary alternative
X-ray functionality can also be achieved through various in-game glitches, which are unintended bugs that allow players to temporarily see through blocks. Examples of X-ray glitches include methods involving pistons and stairs, composters and gravity blocks, or falling snow, which manipulate the player's camera position. If you want to try X-ray without installing any files, these glitches are an option, but X-ray glitches are considered bugs and may be patched or cease to work with future game updates.
Optimizing your X-ray vision settings
For optimal visibility with X-ray texture packs, it is often recommended to disable "Smooth Lighting" and "Vibrant Visuals" and increase the in-game brightness. If you want the clearest possible view of ores through transparent stone, these adjustments make a significant difference. Using OptiFine in conjunction with X-ray texture packs can enhance visibility by providing an effective night vision effect and allowing precise control over smooth lighting settings.
Is X-raying in Minecraft cheating?
In single-player Minecraft worlds, using X-ray is generally a personal choice and does not carry the risk of being banned, as it is your own world. However, using X-ray on most public multiplayer servers is considered cheating and is against their terms of service, often resulting in temporary or permanent bans. If you want to avoid losing access to your favorite server, be aware that server administrators frequently deploy anti-X-ray plugins that obfuscate ore data or monitor player mining statistics to detect and prevent X-ray use, ensuring fair gameplay.

















