Toggle X-ray

Press F6 to instantly toggle X-Ray on/off — see all ores and valuable blocks through terrain with zero configuration.
Back to Files

togglexray-FABRIC-26.3-1.1.2.jar

File nametogglexray-FABRIC-26.3-1.1.2.jar
Uploader
kotoritoskotoritos
Uploaded
Nov 20, 2026
Downloads
8
Size
121.7 KB
Mod Loaders
Fabric
File ID
9708414
Type
R
Release
Supported game versions
  • 26.3

Curse Maven Snippet

Fabric

modImplementation "curse.maven:toggle-x-ray-1472820:9708414"

Learn more about Curse Maven

What's new

Toggle X-Ray 1.1.2 for Minecraft 26.3 (Fabric)

What the mod does

Toggle X-Ray is a client-side X-Ray you switch on and off with one key (F6 by default). It is meant for single-player worlds and for servers where X-Ray is allowed.

While X-Ray is on, every block falls into one of three groups:

Group Examples How it is drawn
Visible blocks (your list) ores, ancient debris, spawners, chests, lava, water Drawn normally and visible through everything around them
Ghost blocks (other full, solid blocks) stone, deepslate, dirt, netherrack Drawn in the chosen style: outlines, see-through, glass or not at all
Hidden blocks (everything else) torches, rails, fences, flowers, grass, signs, beds Not drawn at all

Brightness is raised while X-Ray is on, so dark caves are readable. Your own brightness setting is restored when you turn X-Ray off or quit the game, and on the next start if the game crashed while X-Ray was on.

On-screen messages (action bar):

  • X-Ray: ON / X-Ray: OFF
  • (config/togglexray.json is invalid, using defaults - see log): the file has a syntax error. The mod uses the defaults and never overwrites your file, so you can fix it.
  • (partial Sodium support - see log): your Sodium version changed something the mod hooks into. X-Ray still works, but part of the Sodium integration is turned off. The log says which part.

Requirements

Minecraft 26.3
Fabric Loader 0.19.3 or newer
Fabric API required, 0.160.5 or newer (checked with 0.160.5, 0.160.7, 0.161.0, 0.162.0, 0.163.0 and 0.164.0)
Java 25 or newer
Sodium optional (checked with 0.9.2)

Not compatible with OptiFabric.

Installation

  1. Install Fabric Loader for Minecraft 26.3.
  2. Put togglexray-FABRIC-26.3-1.1.2.jar and Fabric API in your mods folder (Sodium too, if you use it).
  3. Start the game, open a world and press F6. You can change the key in Options → Controls → "Toggle X-Ray". (Minecraft 26.3 stores keys as SDL scancodes; the default is still F6.)

Settings: config/togglexray.json

The file is created on first start. It is read again every time you turn X-Ray on, so you can edit it while the game is running: turn X-Ray off and on again to apply your changes. Edits made while X-Ray is on are kept and used the next time you turn it on.

Key Default Meaning
style "frame" How ghost blocks look: frame (light-blue outlines), fade (see-through), tinted (stained glass in the block's colour), glass (clear glass) or hidden (not drawn)
ghostOpacity 0.8 Opacity of ghost blocks for fade, tinted and glass, from 0.05 to 1.0
visibleBlocks ores, ancient debris, spawners, trial spawners, vaults, chests, trapped chests, budding amethyst, lava, water Block ids to show. diamond_ore means minecraft:diamond_ore; blocks from other mods need the full id, for example "examplemod:tin_ore"
alwaysShown bedrock, water Always shown, even with onlyExposed
onlyExposed false If true, a visible block is only shown when at least one side touches air or another non-solid block (useful to find ores next to caves)
hideBlockEntities true Hides chests, signs, beds, banners and other block entities that are not in your list
gamma 16.0 Brightness while X-Ray is on. The vanilla maximum is 1.0; up to 16.0 is allowed. 0 keeps your normal brightness
configVersion, savedGamma Used by the mod. Do not edit them

Example: only diamonds and ancient debris, see-through stone:

{
  "configVersion": 4,
  "style": "fade",
  "ghostOpacity": 0.3,
  "visibleBlocks": ["diamond_ore", "deepslate_diamond_ore", "ancient_debris"]
}

Changes since 1.1.0

Fixed

  • Hidden blocks without a full face (torches, rails, fences, flowers, tall grass) could still be visible with Fabric API's renderer. Hidden blocks now use an empty model in every renderer.
  • An invalid togglexray.json is no longer replaced with the defaults: the mod warns you and leaves the file alone.
  • Settings from 1.0.x are migrated correctly: brightness 1.0 becomes 16.0, and the new default blocks (trial spawner, vault, trapped chest, lava, water) are added to your list. 1.1.0 skipped this migration.
  • Edits made to togglexray.json while X-Ray was on were overwritten when X-Ray was turned off. They are now kept.
  • Saving the settings works on file systems that do not support atomic moves.

Changed

  • Fabric API is now a required dependency. 1.1.0 bundled only some Fabric API modules. Fabric now shows a clear "missing Fabric API" screen instead of failing later.
  • Works with any Fabric API from 0.160.5 on.
  • Sodium and Fabric API integration is checked at start-up. If an update to one of them changes something the mod relies on, that part of the integration is switched off and reported in the log and on screen, instead of crashing the game.
  • Lower overhead while building chunks (no extra objects created per block face).

Added

  • alwaysShown setting (bedrock and water were hard-coded before).

Known limitations

  • Water inside hidden waterlogged blocks (stairs, slabs, fences) is hidden together with the block.
  • Block tags such as #c:ores are not supported yet: list each block id.
  • Fluids from other mods that use their own renderer are not changed by X-Ray.
  • Occlusion culling is switched off while X-Ray is on, so the frame rate is lower than usual.
  • While X-Ray is on, the brightness slider in Options shows the X-Ray value. Your own value comes back when you turn X-Ray off.
  • Other rendering mods (for example shader packs through Iris) have not been checked.

This mod has no related projects