Paper Anti-Xray: Enable Ore Hiding and Choose an Engine Mode

Enable Paper's built-in anti-xray, choose an engine mode and tune the blocks it hides. Follow the file and restart steps for a VPS, Pterodactyl or Multicraft panel.

zArrowTan Resources Nov 12, 2026 6 min read
config

1 anticheat:

2 anti-xray:

3 enabled: true

4 engine-mode: 2

5 max-block-height: 64

6 update-radius: 2

7 lava-obscures: false

On this page
  1. Find Paper's anti-xray settings
  2. Choose between engine modes 1, 2 and 3
  3. Enable anti-xray without replacing the block lists
  4. Choose which blocks to hide
  5. Be careful with air and chests
  6. Give the Nether and End their own settings
  7. Restart and test ordinary mining
  8. Know the limits and when to consider Orebfuscator

Key takeaways

6
  • Enable anti-xray under anticheat.anti-xray in config/paper-world-defaults.yml.
  • Mode 1 has the lowest server cost; modes 2 and 3 provide stronger obfuscation.
  • Preserve the default block lists for your first test, then tune individual settings.
  • Use dimension-specific paper-world.yml files for Nether and End overrides.
  • Apply changes with a full restart, then test without the bypass permission.
  • Exposed ores and knowledge of the world seed limit what anti-xray can hide.

For server owners running Paper, built-in anti-xray provides a way to hide underground ores without adding another plugin. By the end, you will have enabled it, chosen an engine mode and prepared a test that checks both ore hiding and normal mining.

Find Paper's anti-xray settings

Paper includes anti-xray, but it is disabled by default. Its settings sit under anticheat.anti-xray in the world configuration.

The shared file is config/paper-world-defaults.yml. Settings there apply across worlds unless a world's own paper-world.yml overrides them. Use the shared file for a common starting point, then add world-specific settings where needed.

Before editing, make a backup through your existing backup process. If that process needs attention, follow our guide to automating backups and testing a restore.

  1. Stop the server through its usual console or service controls.
  2. Back up the configuration before changing it.
  3. From the server directory, open config/paper-world-defaults.yml in your usual text editor.
  4. Find the existing anticheat section and its anti-xray settings.
  1. Stop the server from the Console page.
  2. Make a backup using your existing process, or the Backups tab if your host provides it.
  3. Open the File Manager, then config/paper-world-defaults.yml.
  4. Find the existing anticheat section and its anti-xray settings.
  1. Stop the server using the panel controls.
  2. Make a backup using your existing process.
  3. Use Files / FTP to open config/paper-world-defaults.yml.
  4. Find the existing anticheat section and its anti-xray settings.

Choose between engine modes 1, 2 and 3

The engine mode changes the fake block information players receive. Paper defaults to mode 1, but enabling anti-xray and choosing its mode are separate settings.

ModeHow it hides blocksTradeoff
1Replaces enclosed hidden blocks with ordinary terrain blocks appropriate to the dimension.The lowest server resource cost, but only hides ores completely surrounded by solid blocks.
2Replaces hidden blocks and replacement blocks with randomly selected entries from the hidden-block list.Creates fake ore throughout the affected terrain and offers stronger protection than mode 1, with greater server resource use.
3Works like mode 2, but chooses a random block for each chunk layer rather than each individual block.Improves chunk compression and reduces joining network load compared with mode 2.

Start with mode 1 if keeping server overhead low is your priority. If you want the stronger obfuscation approach, test mode 2 or 3 with your actual players and hardware. Paper's anti-xray guideSource site explains the modes and their limitations.

Enable anti-xray without replacing the block lists

The following example enables mode 2 while keeping several other settings at their documented defaults. Merge these values into the existing section, preserving its hidden-blocks and replacement-blocks lists.

anticheat:
  anti-xray:
    enabled: true
    engine-mode: 2
    max-block-height: 64
    update-radius: 2
    lava-obscures: false
    use-permission: false

This is a partial configuration, so do not replace the whole file with it or add a second anticheat section. Preserve the indentation of the surrounding settings.

The default max-block-height is 64. Choose the height according to what you want protected in that world. Keep update-radius at its default of 2 for your first test; the documented range is 0 to 2.

Leave use-permission: false unless you specifically need a bypass. With permission checks enabled, players holding paper.antixray.bypass skip anti-xray. Paper's permission reference says nobody receives that permission by default.

Choose which blocks to hide

The two block lists have different jobs. Understanding that difference helps avoid a configuration that hides fewer blocks than you intended.

  • hidden-blocks: the blocks anti-xray hides. In modes 2 and 3, suitable entries also supply the fake blocks shown to clients.
  • replacement-blocks: additional blocks replaced with fake hidden blocks in modes 2 and 3.

Paper's default hidden list includes the main ores and their deepslate variants, along with entries such as raw copper blocks, raw iron blocks, clay, obsidian, chests and ender chests. The default replacement list contains stone, oak_planks and deepslate. Keeping those defaults initially gives you a clear baseline.

Be careful with air and chests

Paper documents adding air to the hidden list as useful against cave finders. It also warns that this can reduce client FPS for all players, so test it separately from your initial enablement.

Chests need special treatment because they are block entities. Paper notes that they cannot serve as fake hidden blocks in mode 2, although listing chest can help hide buried treasure chests when the maximum block height is raised. Do not assume every block in the list behaves like an ore.

Give the Nether and End their own settings

Use per-world overrides when different dimensions need different hidden blocks or heights. Paper's current world configuration referenceSource site places these files inside the world's dimension directories.

With the server stopped, open the target dimension's paper-world.yml in your text editor. For the default world folder, the Nether path is world/dimensions/minecraft/the_nether/paper-world.yml, and the End path is world/dimensions/minecraft/the_end/paper-world.yml.

With the server stopped, use the File Manager to browse to the target dimension's paper-world.yml. In the default world folder, look under world/dimensions/minecraft/the_nether/ or world/dimensions/minecraft/the_end/.

With the server stopped, use Files / FTP to open the target dimension's paper-world.yml. In the default world folder, look under world/dimensions/minecraft/the_nether/ or world/dimensions/minecraft/the_end/.

Set the required overrides under the same anticheat.anti-xray structure. Review the hidden-block list for each dimension rather than assuming the Overworld list covers the blocks you care about there.

Restart and test ordinary mining

Paper requires a full server restart to apply anti-xray changes. Save every edited file before starting the server again.

Save your edits, then start the server through its usual launch command or service controls. If it is already running, perform a complete stop and start.

Save the files in the File Manager, then use the Console page controls to complete a full stop and start.

Save or upload the edited files through Files / FTP, then use the panel controls to complete a full stop and start.

  1. Test in each dimension where you changed settings.
  2. Use an account without the bypass permission if you enabled permission checks.
  3. Check enclosed underground ores as well as normal mining and exposed cave surfaces.
  4. Assess server responsiveness and client frame rates before changing another setting.

If fake blocks appear to be missing during an x-ray test, Paper notes that the testing mod may disable those blocks or the resource pack may hide them. Check the client's display settings before concluding that the server configuration has failed.

Know the limits and when to consider Orebfuscator

Anti-xray does not make suspicious mining impossible. Ores exposed to air or transparent blocks can remain visible because players can legitimately see them. Paper also warns that knowledge of the world seed can let a client calculate real ore locations; it points to feature seeds as a partial mitigation.

Orebfuscator is another option when you need block-entity hiding or proximity-based visibility controls. It changes network packets without changing the world itself.

Its listing describes support for obfuscating blocks, hiding block entities such as chests and adjusting visibility by player proximity. Read its Java and dependency requirements before installing it, and use its configuration and troubleshooting wiki to plan a separate test.

For broader protection, our Paper anti-cheat comparison covers other detection needs. If you need to investigate changes made by a player, follow our guide to inspecting activity and rolling back griefing. Keep those investigation tasks separate from checking whether ore hiding works.

Frequently asked questions

Does Paper have built-in anti-xray?

Yes. Paper includes anti-xray, but it is disabled by default. Enable it under anticheat.anti-xray in config/paper-world-defaults.yml, or use a world's paper-world.yml for an override.

What is the difference between Paper anti-xray modes 1, 2 and 3?

Mode 1 hides enclosed ores behind ordinary terrain blocks and has the lowest server resource cost. Mode 2 fills affected terrain with randomly selected fake hidden blocks. Mode 3 uses a random block per chunk layer, improving compression and reducing joining network load compared with mode 2.

Does Paper anti-xray cause lag?

Paper documents higher server resource use for modes 2 and 3 than for mode 1. Adding air to hidden-blocks can also reduce client FPS. Test your chosen settings before expanding the hidden blocks or covered height.

Why can players still find diamonds with anti-xray enabled?

Anti-xray does not hide every legitimately visible ore, including ores exposed to air or transparent blocks. Paper also warns that clients which learn the world seed can calculate ore locations. Finding diamonds alone does not establish whether ore hiding is working.

How does paper.antixray.bypass work?

The permission bypass applies when use-permission is true. Players holding paper.antixray.bypass then skip anti-xray, and Paper says nobody receives this permission by default. Use an account without that permission when testing protection.

Share this post

Other plugins mentioned

Related posts

© zArrowTan Resources 2026
Forked and customised by zArrowTan · Powered by Light Store