NeuralAntiCheat
适用于 Paper 1.21.1 的自学习、基于数据包的反作弊插件
概述
NeuralAntiCheat 是一款为 Paper 1.21.1 从头构建的现代反作弊插件。与传统依赖简单阈值检查的反作弊不同,NeuralAntiCheat 结合了实时数据包拦截与内置神经网络,能够从每次玩家会话中学习——随着时间的推移变得越来越智能。
该插件需要 ProtocolLib 来在服务器处理之前拦截原始客户端数据包。所有检测都在专用的异步线程池上运行,这意味着无论玩家数量多少,都不会对主服务器线程造成任何 TPS(每秒刻数)影响。
核心特性
基于数据包的检测 — 通过 ProtocolLib 拦截原始客户端→服务器的数据包。检测分析实际的网络数据,而不仅仅是 Bukkit 事件,从而以更低的开销提供更准确的检测。
完全异步 — 每个检测都在专用的 NeuralAC-Check 线程池上运行,该线程池会根据 CPU 核心数量进行扩展。在检测执行期间,主服务器线程不会被触碰。
延迟补偿 — Reach(距离)检测具有动态 Ping 缓冲。Ping 高于 300ms 的玩家将完全被排除在移动检测之外。对于连接不佳的情况,违规权重会相应降低。
神经网络引擎 (MLP 16→32→16→2) — 一个纯 Java 多层感知机,在 800 个合成会话上进行训练。分析每位玩家的 16 项行为特征。分数接近 1.0 表示正常,接近 0.0 表示作弊。
预测性移动 — FlightCheck(飞行检测)和 SpeedCheck(速度检测)每刻模拟原版 Minecraft 物理效果:重力 (0.08/刻)、阻力 (0.98)、药水修饰符、表面摩擦力。标记偏离预测轨迹的行为,而不是使用原始阈值。
检测项 (共 16 项)
战斗
KillAura(杀戮光环)— 通过分析攻击角度(如果 consistently 超过 75° 则标记)、多目标切换模式以及近乎零方差的人类无法达到的 CPS(每秒点击次数)来检测自动攻击外挂。
Reach(距离)— 标记超出 3.05 格的命中。动态添加 Ping 缓冲,因此高延迟玩家不会误报。
AutoArmor(自动装备盔甲)— 检测人类手部物理上无法实现的瞬间 0 刻盔甲装备。
FastBow(快速拉弓)— 标记在不到 3 刻内释放的弓,这在使用真实弓弦时物理上是不可能的。
AntiKnockback(抗击退)— 检测到受到攻击后速度几乎为零,意味着客户端正在静默忽略击退数据包。移动
Flight(飞行)— 预测性物理引擎每刻都模拟原版重力。如果玩家的实际 Y 坐标偏离预测轨迹超过 0.5 格,则会被标记。不再有来自跳跃或山坡的误报。
Speed(速度)— 根据疾跑状态、活跃药水和表面类型计算允许的水平速度上限。标记超出该值 15% 以上的情况。
Jesus(水上行走)— 标记连续 12 刻以上站在水面上且不沉没的玩家,这在原版中是不可能的。
Spider(蜘蛛)— 检测爬墙行为,需同时满足三个条件:向上运动、近乎零的水平速度(因此跳向墙壁不算在内)以及与实心墙壁相邻持续 5 刻以上。
NoFall(无掉落伤害)— 追踪超过 4 格的坠落中有多少比例实际上造成了伤害。如果玩家受伤概率低于 25%,则会被标记。
Phase(穿墙)— 通过检查玩家是否在实心方块内持续 3 刻或更久,来检测 Noclip 和 Phase 外挂。
Timer(计时器)— 测量移动数据包的到达速度。如果数据包到达速度快于原版标准(每刻 50ms)15% 以上,则会被标记。玩家
FastPlace(快速放置)— 使用滚动 1 秒窗口。原版按住右键每秒大约放置 14–16 个方块。该检测允许最多 16 个,并在达到 17+ 时标记,因此正常建造不会触发它。
FastBreak(快速破坏)— 标记每秒超过 25 次方块破坏的情况,这超过了 Efficiency V(效率 V)和 Haste II(迅捷 II)组合所能达到的最大速度。
Scaffold(自动搭路)— 检测自动搭桥,如果超过 70% 的方块放置发生在高速移动且未向下看的情况下,则会被标记。
InventoryMove(背包移动)— 当打开物品栏界面时,标记移动速度超过 0.5 m/s 的情况,这在原版客户端中是不可能的。
命令
/nac info nac.admin 插件状态,神经网络引擎状态
/nac flags <player> nac.admin 查看违规记录和神经网络评分
/nac whitelist <player> nac.admin 切换检测绕过权限
/nac train cheat|legit <player> nac.admin 手动校正神经网络
/nac reload nac.admin 无需重启即可重新加载配置
/nac alerts nac.alerts 切换您自己的警报可见性
安装
- 将 ProtocolLib 5.3.0 放入 plugins/ 文件夹
- 将 NeuralAntiCheat-2.0.0.jar 放入 plugins/ 文件夹
- 启动服务器 — 神经网络引擎会在首次启动时自动预训练
- 从 v1.x 升级:在启动前删除 plugins/NeuralAntiCheat/neural/model.dat
所需环境: Paper 1.21.1 · Java 21 · ProtocolLib 5.3.0
NeuralAntiCheat
A self-learning, packet-based anticheat plugin for Paper 1.21.1
Overview
NeuralAntiCheat is a modern anticheat plugin built from the ground up for Paper 1.21.1. Unlike traditional anticheats that rely on simple threshold checks, NeuralAntiCheat combines real-time packet interception with a built-in neural network that learns from every player session — getting smarter over time.
The plugin requires ProtocolLib to intercept raw client packets before they are processed by the server. All checks run on a dedicated async thread pool, meaning zero TPS impact on your main server thread regardless of player count.
Core Features
Packet-Based Analysis — Intercepts raw client→server packets via ProtocolLib. Checks analyze actual network data, not just Bukkit events, giving far more accurate detection with less overhead.
Fully Asynchronous — Every check runs on a dedicated NeuralAC-Check thread pool that scales to CPU core count. The main server thread is never touched during check execution.
Lag Compensation — Dynamic ping buffer on Reach checks. Players above 300ms ping are excluded from movement checks entirely. Violation weight is scaled down for laggy connections.
Neural Engine (MLP 16→32→16→2) — A pure-Java multilayer perceptron trained on 800 synthetic sessions. Analyzes 16 behavioral features per player. Score near 1.0 = legitimate, near 0.0 = cheating.
Predictive Movement — FlightCheck and SpeedCheck simulate vanilla Minecraft physics each tick: gravity (0.08/tick), drag (0.98), potion modifiers, surface friction. Flags deviation from predicted trajectory rather than a raw threshold.
Checks (16 total)
Combat
KillAura — detects auto-attack hacks by analyzing attack angles (flags if consistently above 75°), multi-target switching patterns, and inhuman CPS with near-zero variance.
Reach — flags hits beyond 3.05 blocks. Dynamically adds a ping buffer so high-latency players don't get false flagged.
AutoArmor — detects instant 0-tick armor equipping that no human hand can physically perform.
FastBow — flags bows released in under 3 ticks, which is physically impossible with a real bowstring draw.
AntiKnockback — detects near-zero velocity after receiving a hit, meaning the client is silently ignoring knockback packets.Movement
Flight — a predictive physics engine simulates vanilla gravity every single tick. If the player's actual Y position deviates more than 0.5 blocks above the predicted trajectory, it flags. No more false positives from jumps or hills.
Speed — calculates the exact allowed horizontal speed based on sprint state, active potions, and surface type. Flags anything more than 15% above that.
Jesus — flags players standing on water for more than 12 consecutive ticks without sinking, which is impossible in vanilla.
Spider — detects wall-climbing by requiring three conditions simultaneously: upward motion, near-zero horizontal speed (so jumping next to a wall doesn't count), and adjacency to a solid wall for 5+ consecutive ticks.
NoFall — tracks what percentage of falls over 4 blocks actually result in damage. Flags if the player takes damage less than 25% of the time.
Phase — detects Noclip and Phase hacks by checking if the player is inside a solid block for 3 or more consecutive ticks.
Timer — measures how fast movement packets arrive. Flags if packets come in more than 15% faster than the vanilla standard of 50ms per tick.Player
FastPlace — uses a rolling 1-second window. Vanilla holding RMB places about 14–16 blocks per second. The check allows up to 16 and flags at 17+, so normal building never triggers it.
FastBreak — flags more than 25 block breaks per second, which is above the maximum achievable with Efficiency V and Haste II combined.
Scaffold — detects auto-bridging by flagging if more than 70% of block placements happen while moving at high speed without looking down.
InventoryMove — flags movement faster than 0.5 m/s while the inventory screen is open, which is impossible in the vanilla client.
Commands
/nac info nac.admin Plugin status, neural engine state
/nac flags <player> nac.admin View violations and neural score
/nac whitelist <player> nac.adminToggle check bypass
/nac train cheat|legit <player> nac.adminManually correct the neural network
/nac reload nac.adminReload config without restart
/nac alerts nac.alertsToggle alert visibility for yourself
Installation
- Place ProtocolLib 5.3.0 in your plugins/ folder
- Place NeuralAntiCheat-2.0.0.jar in your plugins/ folder
- Start the server — neural engine pre-trains automatically on first launch
- Updating from v1.x: delete plugins/NeuralAntiCheat/neural/model.dat before starting
Requires: Paper 1.21.1 · Java 21 · ProtocolLib 5.3.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧