A robust server-side moderation and protection toolkit for Minecraft Forge 1.20.1.
Barix delivers actionable auditing, region protection, anti-xray obfuscation, Discord alerts, and a lightweight lag monitor—built for clarity, security, and performance.
barixAudit & Forensics
Region Protection
Anti-Xray (Packet-Based)
data/barix/tags/blocks/anti_xray_ores.json.Discord Alerts
Live Lag Monitor
Admin UX and API
BarixAPI, IBarixLagTracker) to integrate or observe from other mods.Pluggable Modules API (New)
BarixAPI.registerModule(IBarixModule).dependsOn()), safe restarts on registration/unregistration.Modules/<moduleId>.AntiCheat Suite (New)
Server (required):
mods/ folder.Client (optional):
config/barix/config/barix/audit/ (JSON logs with rotation).config/barix/*.toml entries).data/barix/tags/blocks/anti_xray_ores.json in a datapack or resource override to adjust which blocks get masked.General notes:
core.enabled (bool): master switch for Barix subsystems.core.debug (bool): verbose global logs (developer-oriented; may be noisy).core.locale (string, e.g. fr_fr, en_us): server language for messages and console output./bx lang reload.regions.selection_particles (bool, default: true): enable/disable server-side particles for pos1/pos2 and region boxes.regions.preview_radius (int 4..128, default: 16): how far the box preview can be seen around players.regions.debug (bool, default: false): verbose logs for region operations.regions.wand_enable (bool, default: true): enable the wand.regions.wand_item (string ResourceLocation, default: minecraft:stick): which item acts as the wand (e.g. minecraft:blaze_rod).regions.wand_sneak_only (bool, default: false): if true, wand actions require sneaking.regions.wand_min_permission_level (int 0..4, default: 3): minimal permission level required to use the wand.Quick setup examples (in-game):
/bx config set regions.wand_item minecraft:blaze_rod
/bx config set regions.wand_sneak_only true
/bx config set regions.selection_particles true
/bx config save
antixray.enable (bool): master switch.antixray.hide_surface (bool): also hide ores that touch air.antixray.reveal_radius (int): reveal radius around players.antixray.apply_below_y (int): apply only below this Y.antixray.dimension_whitelist (CSV ResourceLocations): limit to listed dimensions.antixray.bypass_permission_level (int -1..4): ignore for players at/above level.antixray.bypass_players (CSV names): ignore for listed players.antixray.camo_block / antixray.camo_deepslate_block (IDs): blocks used to mask targets.antixray.deepslate_y (int): switch to deepslate camo below this Y.antixray.mask_on_chunkload (bool): mask right after sending chunk.antixray.mask_section_updates (bool): mask section updates too.antixray.max_block_updates_per_chunk (int): per-chunk cap to avoid spam.antixray.extra_blocks (CSV block IDs): extra blocks to hide in addition to the ore tag.antixray.disable_if_mod_present (CSV modids): automatically disable Barix Anti-Xray if any is loaded.antixray.debug (bool): verbose logs.logging.jsonl (bool): write JSONL logs.logging.roll_daily (bool): daily rotation.logging.max_bytes (long): size-based rotation threshold.logging.compress_on_stop (bool): gzip rotation on server stop.logging.discord_webhook (string): webhook URL; empty to disable.logging.discord_username (string): display name used by webhook.logging.alert_cooldown_seconds (int): anti-spam cooldown for identical alerts.logging.alert_ingame_admins_only (bool): show in-game alerts only to admins.permissions.default_level (int 0..4, default 3): default required level for /bx sensitive ops.permissions.op_is_admin (bool): treat server operators as admins by default.audit.enable_all.audit.log_open|close|place|break|login|logout|respawn|dim_change|pickup|drop|craft|smelt|explosion|block_interact|anvil|chat.audit.click_open_window_ms window to correlate click→open.topluck.enabled.topluck.threshold, topluck.cooldown_seconds, topluck.notify_admins_only, topluck.broadcast, topluck.log_console.topluck.event_fishing|event_looting|event_mining and tunables topluck.fishing_min_treasure, topluck.looting_min_level, topluck.events_scale.topluck.ratio_threshold, topluck.ratio_min_base, topluck.ratio_window_seconds, topluck.ratio_split_dimensions.topluck.debug.All detectors support whitelists (CSV names), admin bypass via permission level, cooldowns between alerts, and configurable actions: log, alert, or kick with custom kick message.
Reach Detection
reach_detection.enabled, max_legal_distance, buffer, window_seconds, infractions_threshold, cooldown_seconds, notify_admins_only, ignore_permission_level, whitelist_players, debug.block_check_enabled, block_max_distance, block_buffer, block_ignore_creative.KillAura Detection
killaura.enabled, cps_window_ms, max_cps, max_fov_degrees, require_line_of_sight, switch_window_ms, max_targets_in_switch_window, window_seconds, infractions_threshold, cooldown_seconds, ignore_permission_level, whitelist_players, action_on_detect, kick_message.Speed Detection
speed_detection.enabled, window_seconds, infractions_threshold, cooldown_seconds, base_max_mps, sprint_multiplier, potion_per_level, ice_multiplier, buffer_mps, max_teleport_delta, ignores for creative|flight|elytra|vehicles|riptide, action_on_detect, kick_message, debug.Fly Detection
fly_detection.enabled, max_vertical_speed, buffer, max_air_time_seconds, window_seconds, infractions_threshold, cooldown_seconds, ignores for creative|elytra|vehicle|levitation_potion, action_on_detect, kick_message, debug.Instant Break Detection
instant_break.enabled, window_seconds, infractions_threshold, cooldown_seconds, tolerance_ms, tolerance_factor, min_expected_ms, ignore_permission_level, whitelist_players, action_on_detect, kick_message, debug.Nuker Detection
nuker.enabled, window_seconds, max_blocks_in_window, cluster_ms, max_blocks_in_cluster, max_reach_distance, reach_buffer, ignore_permission_level, ignore_creative, whitelist_players, cooldown_seconds, action_on_detect, kick_message, debug.Client Detection
client_detection.log_on_login).deny_mod_ids, deny_mod_names).log|alert|kick with kick_message and optional Discord alert (alert_discord).Barix registers a root command /bx (alias /barix). Below is a quick overview; in-game help remains authoritative.
Core
/bx ping/bx help/bx lang reloadAudit
/bx audit status|on|off|toggle/bx audit window <ms>/bx audit set <open|close|place|break> <on|off>/bx audit query uuid <uuid> [limit]/bx audit query block <mod:id> [limit]/bx audit compress-nowConfig
/bx config list [prefix]/bx config get <key>/bx config set <key> <value>/bx config save/bx config reloadLag
/bx lagscan <seconds> — run a short lag scan and print top consumers.Alerts
/bx alert test — send a test alert (if webhook configured).TopLuck
/bx topluck status|on|off|toggle|reset-cooldowns/bx topluck cooldown <seconds>/bx topluck threshold <double>/bx topluck ratio threshold <double> | minbase <int> | window <seconds> | splitdims <on|off|toggle>/bx topluck events list|enable <name>|disable <name>Modules (New)
/bx modules list — show loaded modules (native + external)/bx modules status — show started state and list/bx modules reload — rebuild from config + external registry and start/bx modules restart — stop + start current stackAntiCheat toggle (via Modules API)
/bx anticheat status|on|off|toggleCore region commands (with advanced suggestions):
/bx region pos1 [x y z] — set pos1. Suggests your current coordinates if omitted./bx region pos2 [x y z] — set pos2. Suggests your current coordinates if omitted./bx region create <id> — create a region; suggests a free id like region_1./bx region remove <id> — remove by id; suggests existing ids./bx region list — list regions in the current world./bx region info <id> — info line + flags; suggests existing ids./bx region at [x y z] — list regions at a position; suggests your current coordinates./bx region priority <id> <value> — set priority; suggests the current priority./bx region name <id> <value> — set display name; suggests the current name./bx region setflag <id> <flag> on|off|clear — suggests ids and flag names (enum-based)./bx region addowner|delowner <id> <uuid> — suggests ids and online players’ UUIDs (with player name hints)./bx region addmember|delmember <id> <uuid> — same as above for members.Visuals (no client mod required):
regions.selection_particles.Selection wand (configurable):
regions.wand_min_permission_level and (optionally) sneaking.Each module start/stop emits clear logs under categories like Modules/anticheat or Modules/example:
barix.modules.log.startingbarix.modules.log.startedbarix.modules.log.stoppingbarix.modules.log.stoppedThese show colorized in console with Barix’s logging formatter.
Third-party mods can add their own modules to Barix and participate in the lifecycle. Implement IBarixModule, then register it through BarixAPI.
public interface IBarixModule {
String id(); // unique, stable
default List<String> dependsOn(){ return List.of(); }
void start(); // subscribe/register/start
void stop(); // cleanup/unregister
}
// Register (e.g., mod setup or server starting)
fr.bck.barix.api.BarixAPI.registerModule(new MyModule());
// Unregister later if needed
fr.bck.barix.api.BarixAPI.unregisterModule("mymodule");
dependsOn() controls ordering; modules are topo-sorted on start.This repository includes a minimal example module at:
src/main/java/fr/bck/barix/example/ExampleExternalModule.javaIt is not auto-registered. To try it, call during your mod init:
fr.bck.barix.api.BarixAPI.registerModule(new fr.bck.barix.example.ExampleExternalModule());
Then run /bx modules status in game to see it listed. You’ll also see console logs under Modules/example on start/stop.
Barix Anti-Xray can gracefully coexist with other mods by either disabling itself when specific mods are present or by delegating decisions to compatibility providers.
Config-based disable
antixray.disable_if_mod_present (CSV of modids)antixray.disable_if_mod_present = otherantixray, some_network_overhaulAPI-based providers
fr.bck.barix.api.IAntiXrayCompat and register via BarixAPI.registerAntiXrayCompat(...).disableBarixAntiXrayCompletely()),shouldApplyFor(ServerPlayer)),isTargetBlock(BlockState)),shouldHide(...)).Registration snippet:
fr.bck.barix.api.BarixAPI.registerAntiXrayCompat(new IAntiXrayCompat() {
@Override public String id() { return "my-compat"; }
@Override public boolean shouldApplyFor(ServerPlayer sp) {
// Disable Anti-Xray in The End as an example
return !sp.level().dimension().location().toString().equals("minecraft:the_end");
}
@Override public boolean isTargetBlock(BlockState state) {
// Also hide raw copper blocks (demo)
return state.is(net.minecraft.world.level.block.Blocks.RAW_COPPER_BLOCK);
}
@Override public boolean shouldHide(ServerPlayer sp, BlockPos pos, BlockState state, Level lvl) {
// Do not hide emerald ores above Y=50 (demo)
if (state.is(net.minecraft.world.level.block.Blocks.EMERALD_ORE) && pos.getY() > 50) return false;
return true;
}
});
src/main/java/fr/bck/barix/example/ExampleAntiXrayCompat.javaBarix includes a permissions bridge to work with common permission providers (e.g., LuckPerms on Forge).
Typical nodes (examples; adjust to your permission plugin):
barix.admin — Full admin access.barix.region.* — Region management.barix.audit.* — Audit querying/rotation.barix.lag.* — Lag monitor commands.barix.wand — Selection tool.If no permission provider is present, Barix defaults to operator checks for sensitive commands.
Q: Do players need Barix client-side?
Q: Can I change which ores are hidden by anti-xray?
anti_xray_ores block tag via datapack or resource data to suit your server’s rules.Q: Where are the logs?
config/barix/audit/ with automatic rotation.Q: How do I set up Discord alerts?
config/barix/. Leave empty to disable.fr.bck.barix.api.* exposes hooks for lag tracking and selected events.IBarixModule + BarixAPI.registerModule/unregisterModule to plug additional features.Barix focuses on clarity and control: actionable logs, sane defaults, and admin tools that don’t get in your way. If you run a survival or semi-vanilla server, Barix helps you keep it fair and fast.
/bx lagscan command./bx modules and /bx anticheat to manage the module stack./bx lang reload.Barix supports Forge’s built‑in update checker.
src/main/resources/update.json (committed in this repo)src/main/resources/META-INF/mods.toml via updateJSONURL.https://raw.githubusercontent.com/Blaackknight/Barix/main/src/main/resources/update.jsonhttps://blaackknight.github.io/Barix/update.jsonupdateJSONURL to the Pages URL if you prefer CDN‑backed delivery.1.20.1 and version 1.0.13-BETA, plus promos.mod_version in gradle.properties. 2) Add a new entry under the relevant MC version in update.json and update promos (1.20.1-latest/recommended). 3) Commit and push; the update checker will pick it up from the configured URL.