Skip to content

Config Reference

AntiXray writes config.json to its data folder (mods/Stoshe_AntiXray/) on first start. Keys named "//" or "//Something" are comments and are ignored. Apply changes with Tools → Reload config in the panel — no restart needed.

Block ids first

Every id in this file must match your server's real block ids. If you haven't already, do the Probe workflow before tuning anything else.

General

json
"General": {
  "Language": "en_us",
  "PrefixEnabled": true,
  "Prefix": "{#ff5c5c}[AntiXray] {#ffffff}",
  "EnabledWorlds": [],
  "BypassPlayers": [],
  "BypassByPermission": false
}
KeyDefaultDescription
Languageen_usLanguage file from lang/ (en_us, pt_br, …). English is always the fallback. See localization.
PrefixEnabledtrueWhether plugin messages are prefixed.
Prefix[AntiXray]The chat prefix (supports {#rrggbb} colour codes).
EnabledWorlds[]Worlds where AntiXray is active. Empty = every world.
BypassPlayers[]Usernames exempt from obfuscation and detection. Explicit list — ops are not auto-exempt, so you can test protection as an admin.
BypassByPermissionfalseAlso honour the antixray.bypass permission. Off by default, because a wildcard/op permission would otherwise silently disable protection for every admin.

Obfuscation

Packet-level protection — the primary defense.

json
"Obfuscation": {
  "Enabled": true,
  "SendTimeMode": false,
  "ChunkRadius": 6,
  "VerticalRadius": 32,
  "MaxChunksPerTick": 8,
  "MaxY": 128,
  "CoverDepth": 2,
  "RevealRadius": 2,
  "HoneypotHostPrefixes": ["Rock_"],
  "FakeOreDensity": 0.03,
  "MaxTrapsPerPlayer": 40000,
  "RadiusBlocks": 24,
  "FakeOrePalette": ["Ore_*"],
  "FallbackHideBlock": "Rock_Stone",
  "HideRealOreAs": "Rock_Stone"
}
KeyDefaultDescription
EnabledtrueMaster switch for obfuscation.
SendTimeModefalseExperimental. Delivery mode. false = the classic per-player ServerSetBlock scan. true = send-time: each chunk is rewritten as it is sent so it arrives already-obfuscated — no correction packets, no brief real-ore flash, and the obfuscated chunk is cached per section and shared across players (CPU scales with unique chunks, not player count). See Send-time mode.
ChunkRadius6Radius in chunks around each player whose nearby chunks get obfuscated. Lower this first for performance.
VerticalRadius32Blocks above and below the player to obfuscate — a slab that follows them, not the whole column.
MaxChunksPerTick8Max new chunks obfuscated per player per second (spreads load as they move).
MaxY128Absolute ceiling — never obfuscate above this Y, so the surface/sky stay untouched.
CoverDepth2Solid blocks required between a fake ore and any air, along each axis. 1 = just off a visible face; 2+ = buried deeper.
RevealRadius2On breaking a block, re-send real blocks within this radius (a safety buffer) so mining never uncovers a fake. Keep close to CoverDepth.
HoneypotHostPrefixes["Rock_"]Fake ores only replace blocks whose id starts with one of these (real rock layers), so they never land in dirt/gravel/sand. Empty = any hidden block.
FakeOreDensity0.03Fraction (0–1) of hidden rock turned into a fake ore — how thick the honeypot field is (evenly, stably distributed). This controls only how many honeypots exist; real ores are always hidden by HideRealOreAs either way. Sane range 0.010.05. See the warning below.
MaxTrapsPerPlayer40000Memory cap on tracked honeypot positions per player. On reaching it, obfuscation stops for that player (rather than silently untracking blocks) and a warning is logged.
RadiusBlocks24Block radius used only by the debug Test-flash / X-ray-audit views.
FakeOrePalette["Ore_*"]The fake-ore field. Entries are exact ids or "Prefix*" wildcards — the default auto-discovers every ore variant actually registered in your world, so there's no id list to maintain. Check the resolved count in the Status tab.
FallbackHideBlockRock_StoneUsed only if none of the palette ids resolve.
HideRealOreAsRock_StoneReal hidden ores are shown as this (plain rock), so X-ray sees nothing at their true location.

Keep FakeOreDensity low

Each fake ore is one packet in classic mode, and an X-ray user's client has to render every one of them as custom-model geometry. 0.2 means roughly 10 000 fakes per chunk — that stutters the server on chunk load and freezes or crashes any client running a transparency pack, which also tips the cheater off that the server is protected. 0.03 is about 1–1.5 k per chunk and is plenty: one honeypot hit is all you need. If you want a genuinely thick field, use SendTimeMode, where density costs almost nothing on the wire.

Protected blocks

A second layer for valuable non-ore blocks — see Protected Blocks.

json
"ProtectedBlocksEnabled": true,
"ProtectedBlocks": [],
"HideProtectedAs": "Rock_Stone",
"ProtectedDecoyPalette": ["Furniture_Crude_Chest_Small"],
"ProtectedDecoyChunkChance": 0.01
KeyDefaultDescription
ProtectedBlocksEnabledtrueMaster switch for the protected-block layer.
ProtectedBlocks[]Ids or id-prefixes of valuable non-container blocks to hide when fully enclosed. Chests and other containers cannot go here — they carry a block-entity whose model is replicated on a separate channel, so masking the block id leaves the chest poking through the rock. Block-entity blocks are auto-skipped with a console warning; protect chests with decoys instead.
HideProtectedAsRock_StoneWhat real protected blocks are masked as.
ProtectedDecoyPalette["Furniture_Crude_Chest_Small"]Decoy blocks buried in rock as honeypots. A cheater sees "buried loot", digs to it, and trips the trap exactly like a fake ore. Empty = hide only, no decoys.
ProtectedDecoyChunkChance0.01Chance (0–1) that an obfuscated 32×32×32 section contains exactly one buried decoy — never more than one per section. At the default radius that's a handful of chests in the whole area around a player: a rare find, not a field. (The key name says "Chunk" for config compatibility; the unit is a section.)

Detection

Suspicion tracking — the honeypot + rate heuristics.

json
"Detection": {
  "Enabled": true,
  "TrackedOres": ["Ore_Gold_Stone", "Ore_Mithril_Stone", "..."],
  "RateWindowSeconds": 120,
  "RateFlagThreshold": 40,
  "HoneypotHitWeight": 25.0,
  "HoneypotFlagThreshold": 4,
  "ScoreDecayPerMinute": 0.15,
  "AlertAdminsOnFlag": true
}
KeyDefaultDescription
EnabledtrueMaster switch for detection.
TrackedOres(ore list)Valuable ores counted by the mining-rate heuristic (all host-rock variants). Probe them.
RateWindowSeconds120Sliding window for the mining-rate count.
RateFlagThreshold40Tracked-ore breaks within the window at/above this flag the player.
HoneypotHitWeight25.0Suspicion added per honeypot hit.
HoneypotFlagThreshold4Honeypot hits at/above this flag the player on their own.
ScoreDecayPerMinute0.15How fast the suspicion score fades over time.
AlertAdminsOnFlagtrueNotify online admins when a player is flagged.

Spectate

The live follow-camera used by the panel's Spectate button.

json
"Spectate": {
  "CameraDistance": 4.0,
  "LerpSpeed": 0.2,
  "AllowPitchControls": true,
  "FirstPerson": false,
  "FirstPersonForward": 0.45,
  "FollowYOffset": -18.0
}
KeyDefaultDescription
CameraDistance4.0How far behind the target the follow-camera trails (third person).
LerpSpeed0.2Camera smoothing — a per-frame interpolation factor between 0 and 1, matching the value vanilla uses. Higher is snappier. Values above 1 overshoot every frame and make the camera spin, so they're clamped.
AllowPitchControlstrueWhether you can look around while spectating. Forced off in first person.
FirstPersonfalseStart the camera in first person (through the suspect's eyes) instead of third. Flip it live in-game with Tools → Camera view.
FirstPersonForward0.45First person only: how far in front of the suspect's eyes the camera sits, in blocks. 0 puts it inside their head.
FollowYOffset-18.0Your body is teleported along with the suspect (your client needs it there to receive their chunks and entity). This parks it this many blocks below them so you never see your own character in frame — there is no way to hide your own model. Chunks stream per column, so a vertical offset is free. Set 0 to stand right on them.

Localization

AntiXray exports lang/en_us.json and lang/pt_br.json to the data folder on first run. Set General.Language to the file you want; English is always the fallback for any missing key. Edit the files in the data folder to customize every message, then Reload config.

Performance quick-reference

On busy servers, in order of impact:

  1. Lower Obfuscation.ChunkRadius.
  2. Lower Obfuscation.VerticalRadius and/or MaxY.
  3. Lower Obfuscation.FakeOreDensity (fewer honeypot packets) — this is also the first thing to check if X-ray users report crashes.
  4. Lower Obfuscation.MaxChunksPerTick to spread the work more thinly.

Real ores stay hidden at every one of these settings — you're only trading away honeypot coverage and how far ahead of a player the protection runs.

Released under the MIT License.