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.1-1.1.2.jar

File nametogglexray-FABRIC-26.1-1.1.2.jar
Uploader
kotoritoskotoritos
Uploaded
Nov 20, 2026
Downloads
4
Size
120.9 KB
Mod Loaders
Fabric
File ID
9708671
Type
R
Release
Supported game versions
  • 26.1.2
  • 26.1.1
  • 26.1

Curse Maven Snippet

Fabric

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

Learn more about Curse Maven

What's new

Toggle X-Ray 1.1.2 for Minecraft 26.1 (Fabric)

This is the first 1.1 release for Minecraft 26.1. It replaces the 1.0 line on 26.1 and brings the same features as the 1.21.11, 26.2 and 26.3 versions, including Sodium support.

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.1, 26.1.1 or 26.1.2
Fabric Loader 0.18.4 or newer
Fabric API required (new in this version), 0.147.0 or newer (checked with 0.147.0, 0.151.0 and 0.155.2)
Java 25 or newer
Sodium optional (checked with 0.8.10, 0.8.12 and 0.9.1)

Not compatible with OptiFabric.

Installation

  1. Install Fabric Loader for Minecraft 26.1.x.
  2. Remove any older Toggle X-Ray file from your mods folder.
  3. Put togglexray-FABRIC-26.1-1.1.2.jar and Fabric API in your mods folder (Sodium too, if you use it).
  4. Start the game, open a world and press F6. You can change the key in Options → Controls → "Toggle X-Ray".

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. A settings file from 1.0.x is upgraded automatically: your block list and brightness are kept and the new options get their defaults.

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.0.0

Added

  • Sodium support. X-Ray works with Sodium installed, and Sodium no longer hides parts of the world behind stone while X-Ray is on.
  • Five styles for the rest of the terrain (frame, fade, tinted, glass, hidden). 1.0.0 could only make it invisible.
  • Settings style, ghostOpacity, alwaysShown, onlyExposed and hideBlockEntities.
  • Blocks without a full face (torches, rails, fences, flowers, tall grass) are hidden in every renderer.

Changed

  • Turning X-Ray on or off is instant: only the visible chunks are rebuilt. 1.0.0 reloaded all game resources, which took several seconds.
  • The settings file is read every time you turn X-Ray on, not only when the game starts.
  • The message is shown in the action bar instead of the chat.
  • Fabric API is now required. Fabric shows a clear "missing Fabric API" screen if it is not installed.
  • The mod only loads on Minecraft 26.1.x with Java 25. 1.0.0 claimed to support every Minecraft version.
  • 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.

Fixed

  • 1.0.0 could fail to start on Minecraft 26.1: one of its hooks pointed at a game method that no longer exists in 26.1.
  • 1.0.0 could permanently brighten caves in your world. It made ores give off light, and that light could stay in the saved world. This version never touches world lighting: it only raises the screen brightness and restores it afterwards.
  • Blocks behind hidden walls are no longer culled, so ores further away show up.
  • An invalid togglexray.json is no longer replaced with the defaults: the mod warns you and leaves the file alone.
  • Settings from 1.0.0 are migrated: brightness 1.0 becomes 16.0.
  • Edits made to togglexray.json while X-Ray was on are no longer overwritten when X-Ray is turned off.

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