Please read the README.md file on the RayTraceAntiXray github page first. All settings are documented and explained in the linked default config file there. Before configuring the plugin you should enable Paper Anti-Xray using engine-mode: 1. Optionally (especially for testing) you can increase the max-block-height. After configuring Paper Anti-Xray you can configure the plugin using the following settings for example.
(Faster, but worse gameplay experience and less protection.)
settings:
anti-xray:
update-ticks: 1
ms-per-ray-trace-tick: 50
# Adjust to available (ideally unused) CPU threads.
ray-trace-threads: 2
world-settings:
default:
anti-xray:
ray-trace: true
ray-trace-third-person: false
ray-trace-distance: 64.0
rehide-blocks: false
rehide-distance: .inf
max-ray-trace-block-count-per-chunk: 30
ray-trace-blocks:
# You can add further blocks here,
# but the max-ray-trace-block-count-per-chunk setting may need to be adjusted.
- chest
- diamond_ore
- deepslate_diamond_ore
- emerald_ore
- deepslate_emerald_ore
- gold_ore
- deepslate_gold_ore
- lapis_ore
- deepslate_lapis_ore
- spawner
# Adjust world name.
world_nether:
anti-xray:
# Note that ancient_debris never generates naturally exposed to air.
# Normal engine-mode: 1 is sufficient, disable ray tracing in the nether.
ray-trace: false
# Adjust world name.
world_the_end:
anti-xray:
ray-trace: false
(Slower, but better gameplay experience and more protection.)
settings:
anti-xray:
update-ticks: 1
ms-per-ray-trace-tick: 50
# Adjust to available (ideally unused) CPU threads.
ray-trace-threads: 2
world-settings:
default:
anti-xray:
ray-trace: true
# Be aware that this is about three times as resource intensive.
ray-trace-third-person: true
ray-trace-distance: 80.0
rehide-blocks: true
rehide-distance: 76.0
max-ray-trace-block-count-per-chunk: 60
ray-trace-blocks:
# You can add further blocks here,
# but the max-ray-trace-block-count-per-chunk setting may need to be adjusted.
- chest
- diamond_ore
- deepslate_diamond_ore
- emerald_ore
- deepslate_emerald_ore
- gold_ore
- deepslate_gold_ore
- lapis_ore
- deepslate_lapis_ore
- mossy_cobblestone
- spawner
# Adjust world name.
world_nether:
anti-xray:
# Note that ancient_debris never generates naturally exposed to air.
# Normal engine-mode: 1 is sufficient, disable ray tracing in the nether.
ray-trace: false
# Adjust world name.
world_the_end:
anti-xray:
ray-trace: false
These settings are intended only as demo configurations for testing the plugin. I don't recommend using them in production due to their performance impact.
Paper world defaults (server) config:
anticheat:
anti-xray:
enabled: true
engine-mode: 1
hidden-blocks:
# RayTraceAntiXray also hides blocks that are exposed to air.
- mossy_cobblestone
- spawner
- chest
- coal_ore
- deepslate_coal_ore
- copper_ore
- deepslate_copper_ore
- raw_copper_block
- diamond_ore
- deepslate_diamond_ore
- emerald_ore
- deepslate_emerald_ore
- gold_ore
- deepslate_gold_ore
- iron_ore
- deepslate_iron_ore
- raw_iron_block
- lapis_ore
- deepslate_lapis_ore
- redstone_ore
- deepslate_redstone_ore
lava-obscures: false
# As of 1.18 some ores are generated much higher.
# Please adjust the max-block-height setting at your own discretion.
# https://minecraft.wiki/w/Ore might be helpful.
max-block-height: 320
# The replacement-blocks list is not used in engine-mode: 1. Changing this will have no effect.
replacement-blocks: []
update-radius: 2
use-permission: false
RayTraceAntiXray (plugin) config:
settings:
anti-xray:
update-ticks: 1
ms-per-ray-trace-tick: 50
# Adjust to available (ideally unused) CPU threads.
ray-trace-threads: 2
world-settings:
default:
anti-xray:
ray-trace: true
# Be aware that this is about three times as resource intensive.
ray-trace-third-person: true
ray-trace-distance: 160.0
rehide-blocks: true
rehide-distance: 156.0
max-ray-trace-block-count-per-chunk: 100000
# Use an empty list [] here to ray trace all the blocks from the Paper world defaults (server) config.
ray-trace-blocks: []
# Adjust world name.
world_nether:
anti-xray:
# Note that ancient_debris never generates naturally exposed to air.
# Normal engine-mode: 1 is sufficient, disable ray tracing in the nether.
ray-trace: false
# Adjust world name.
world_the_end:
anti-xray:
ray-trace: false
For "timings" you can use the commands /raytraceantixray timings on and /raytraceantixray timings off. If you turn it on, the time in ms per ray trace tick is printed to the console each tick. These times shouldn't be greater than 50ms to 100ms. Remember to turn it off as it gets very spammy.
do i need to have paper-enginemode=1 for the plugin to work? or is it that the plugin actually works without needing to use paper's engine mode 1?