VoidAuth
Minecraft 26.1–26.1.2 必备的身份验证模组 | Fabric | 服务端与客户端均需安装
VoidAuth 是一款专为 Minecraft 26.1 系列设计的安全认证模组,需要在服务器和客户端同时安装。除了基本的登录/注册功能外,它在架构上解决了传统身份验证模组中长期存在的诸多问题——例如画面闪烁、死亡状态卡死以及鞘翅断连导致的虚空陷阱——并提供完整的图形界面管理、细粒度的权限控制以及开发者 API。
? 快速开始
-
安装 Fabric Loader 0.19.2+ 和 Fabric API
-
将 VoidAuth 放入服务端和客户端的 mods 文件夹中
-
启动服务器——配置文件将在 config/voidauth.json 自动生成
-
玩家加入后输入 /voidauth register <密码> 进行注册,之后每次登录使用 /voidauth login <密码>
-
输入 /voidauth help 查看所有命令(可点击!)
? 默认使用 JSON 存储——零依赖,开箱即用。如需 SQLite/MySQL,只需将驱动 jar 包放入 mods 文件夹即可。
? 需求
| 项目 |
要求 |
| Minecraft |
26.1 / 26.1.1 / 26.1.2 |
| Java |
25 |
| Fabric Loader |
0.19.2+ |
| Fabric API |
0.145.1+26.1 |
⚠️ 必须双方安装 —— 未安装 VoidAuth 的客户端将被拒绝并提示进行安装。
✨ 独特功能一览
这些功能是其他 Minecraft 身份验证模组所不具备的:
| # |
特性 |
一句话简介 |
| ? |
四层位置锁定 |
客户端输入冻结 + 服务端位置同步 + 移动数据包拦截 + 偏差修正 —— 消除闪烁与透视 |
| ? |
黑暗防绕过 |
黑暗效果 + 强制伽马值=0 + F3调试屏屏蔽 —— 即使开启全亮也无法看穿 |
| ? |
鞘翅断连保护 |
加入时自动加载 7×7 区块,防止鞘翅断连后陷入虚空陷阱 |
| ? |
死亡状态自动恢复 |
登出时检测死亡并在重新加入时自动重生 —— 无需管理员干预 |
| ⏱️ |
飞行检查宽限期 |
登录后的可配置宽限期期间抑制飞行作弊检测,适用于下落/鞘翅滑翔阶段 |
| ?️ |
BCrypt 截断防护 |
验证密码 UTF-8 长度 ≤ 72 字节,封堵静默的 BCrypt 截断漏洞 |
| ? |
连续字符检测 |
阻止 abc/123/cba/321 等模式 —— 拒绝弱密码 |
| ? |
管理员审计日志 |
所有管理员操作自动记录,支持一键导出并附带时间戳 |
| ? |
细粒度权限节点 |
7 个独立权限节点,支持 Fabric Permissions API |
| ? |
开发者 API |
回调系统 + 数据查询 + 异常隔离,便于第三方模组集成 |
| ? |
自动迁移 |
升级或存储类型切换时自动迁移配置和数据 |
| ?️ |
MySQL 密码保护 |
配置同步使用占位符 ***,防止通过网络泄露密码 |
| ⚙️ |
bcryptCostFactor 验证 |
服务器强制执行范围 10–14,防止通过恶意成本因子发起 DoS 攻击 |
? 独特功能详解
? 四层位置锁定 —— 消除登录闪烁与透视
传统认证模组仅在服务端拦截移动数据包,导致客户端仍可自由移动——从而引发闪烁和透视问题。VoidAuth 实现了四个协同工作的层级:
- ClientInputMixin —— 冻结所有键盘/鼠标输入
- tickFreeze() + LockPositionPacket —— 将客户端锁定在服务端指定的位置,零速度 + 无重力 + 渲染插值锁定
- ServerPlayHandlerMixin —— 拦截所有移动和载具移动数据包
- ServerPlayerEntityMixin —— 主动修正位置偏差,重置飞行检查计数器
核心创新:专用的 LockPositionPayload 网络数据包将服务端坐标同步至客户端,防止因位置不同步导致的嵌入方块问题。
? 黑暗防绕过
传统模组使用失明效果,容易被全亮资源包绕过。VoidAuth 采用三重保护:
- 黑暗效果 —— 即使最高亮度也无法穿透
- 客户端伽马值强制设为 0 —— 登录期间锁定渲染亮度,随后恢复
- 屏蔽 F3 调试屏 —— 防止坐标和实体信息泄露
⏱️ 飞行检查宽限期
登录之后,玩家可能仍在下落或手持鞘翅滑翔。传统模组会立即触发飞行作弊检测并将玩家踢出。VoidAuth 提供了一个可配置的宽限期(flightCheckGracePeriodSeconds),在此期间抑制飞行检查,让玩家安全着陆。
? 鞘翅断开连接保护
当玩家在鞘翅飞行过程中断开连接并重新加入时,传统模组会导致他们卡在虚空中(区块未加载)。VoidAuth 会在玩家加入时主动加载玩家周围 7×7 的区块区域。
? 死亡状态自动恢复
在传统模组中,死亡后断开连接的玩家在重新加入时会处于“已死”状态。VoidAuth 会在登出时记录死亡状态,并在重新加入时自动执行重生。
?️ BCrypt 72 字节截断防护
BCrypt 会静默截断超过 72 字节的密码。攻击者可以利用此前缀碰撞漏洞访问其他账户。VoidAuth 会验证 UTF-8 字节长度,并拒绝超过 72 字节的密码。
? 连续字符检测
除了要求包含字母和数字外,VoidAuth 还会检测升序/降序序列(例如 abc、123、cba、321),以拒绝弱密码。
? 管理员审计日志
所有管理员操作都会自动记录到 logs/voidauth-admin.log 文件中。使用 /voidauth exportlog 命令可以导出带时间戳的副本。
? 细粒度权限节点
| 权限节点 |
操作 |
voidauth.admin.reset |
重置玩家密码 |
voidauth.admin.setpassword |
强制设置密码 |
voidauth.admin.delete |
删除玩家账户 |
voidauth.admin.list |
查看玩家列表 |
voidauth.admin.reload |
重载配置 |
voidauth.admin.config |
修改配置 |
voidauth.admin.exportlog |
导出管理员日志 |
当未安装 Fabric Permissions API 时,回退为 OP(管理员权限)检查。
? 开发者 API 与回调系统
VoidAuthAPI.registerCallback(new AuthCallbackAdapter() {
@Override
public void onAuthenticated(UUID uuid) { /* 登录成功 */ }
});
Set<UUID> authenticated = VoidAuthAPI.getAuthenticatedPlayers();
Optional<PlayerData> data = VoidAuthAPI.getPlayerData(uuid);
AuthCallbackAdapter 提供了空实现,以便选择性重写
- 回调异常会自动隔离 —— 一个回调失败不会影响其他回调
? 自动迁移
- 配置:模组升级时自动进行版本迁移 —— 设置不会丢失
- 数据:切换存储类型时自动迁移(JSON → SQLite → MySQL)
?️ MySQL 密码保护
配置同步数据包会将 MySQL 密码替换为 ***。仅当客户端发送非空且非占位符的值时,服务器才会更新密码。
⚙️ bcryptCostFactor 验证
服务器强制 BCrypt 成本因子范围为 10–14,防止通过恶意的高值进行 DoS 攻击。
? 完整功能列表
玩家命令
| 命令 |
描述 |
点击行为 |
/voidauth login <password> |
登录 |
填充命令,输入密码 |
/voidauth register <password> |
注册 |
填充命令,输入密码 |
/voidauth info |
查看个人信息 |
点击执行 |
/voidauth changepassword |
打开更改密码 GUI |
点击执行 |
/voidauth email |
打开邮件管理 GUI |
点击执行 |
/voidauth unregister |
删除账号(需要确认) |
填充命令,提示后确认 |
/voidauth help |
显示帮助菜单 |
点击执行 |
管理员命令
| 命令 |
描述 |
权限 |
点击行为 |
/voidauth reset <player> |
重置玩家密码 |
voidauth.admin.reset |
填充命令,输入玩家名称 |
/voidauth setpassword <player> <password> |
强制设置密码 |
voidauth.admin.setpassword |
填充命令,输入名称和密码 |
/voidauth list [page] |
查看已注册玩家 |
voidauth.admin.list |
点击执行 |
/voidauth delete <player> |
删除玩家账号 |
voidauth.admin.delete |
填充命令,输入玩家名称 |
/voidauth reload |
重新加载配置 |
voidauth.admin.reload |
点击执行 |
/voidauth config |
打开配置 GUI |
voidauth.admin.config |
点击执行 |
/voidauth exportlog |
导出管理员日志 |
voidauth.admin.exportlog |
点击执行 |
? 帮助菜单中的所有命令均可点击。需要参数的命令会自动填充到聊天栏中。
GUI 界面
- 登录界面 — 带有倒计时计时器,超时自动踢出
- 注册界面 — 注册时可选绑定邮箱
- 更改密码界面 — 旧密码 + 新密码 + 确认密码字段
- 邮件管理界面 — 绑定 / 更改 / 解绑模式
- 配置管理界面 — 所有设置的可视化编辑器
- 账号管理界面 — 统一入口
安全性
- BCrypt 密码哈希(可配置成本因子 10–14)
- 密码强度验证(最少 6 个字符 + 字母和数字 + 连续字符检测 + 72 字节上限)
- 登录失败锁定(可配置尝试次数和持续时间)
- 同 IP 自动登录(可配置有效期)
- 账号删除需确认 + 效果清理 + 数据清除
数据存储
| 存储 |
描述 |
依赖项 |
| JSON |
默认,零依赖 |
无 |
| SQLite |
适用于中小型服务器 |
在 mods 文件夹中安装 sqlite-jdbc |
| MySQL |
适用于大型服务器 / 多服务器 |
在 mods 文件夹中安装 mysql-connector-j |
切换存储类型时数据会自动迁移。如果缺少驱动程序,则回退到 JSON 并发出警告。
? 可选依赖项
未安装时自动回退到默认值(JSON 存储 + OP 权限检查)。核心功能不受影响。
⚙️ 配置
| 设置项 |
默认值 |
描述 |
loginTimeoutSeconds |
120 |
登录超时时间(秒) |
maxPasswordAttempts |
5 |
最大密码尝试次数 |
lockDurationMinutes |
30 |
账号锁定持续时间(分钟) |
bcryptCostFactor |
10 |
BCrypt 成本因子(10–14) |
ipAutoLoginEnabled |
true |
启用同 IP 自动登录 |
ipAutoLoginDurationHours |
24 |
自动登录有效期(小时) |
storageType |
json |
存储类型(json/sqlite/mysql) |
flightCheckGracePeriodSeconds |
30 |
飞行检查宽限期(秒) |
mysqlHost |
localhost |
MySQL 主机地址 |
mysqlPort |
3306 |
MySQL 端口 |
mysqlDatabase |
voidauth |
MySQL 数据库名称 |
mysqlUsername |
root |
MySQL 用户名 |
mysqlPassword |
|
MySQL 密码 |
mysqlPoolSize |
5 |
MySQL 连接池大小 |
? 开发者 API
// 添加依赖项
dependencies {
modImplementation "com.voidauth:voidauth:1.0.0"
}
// 注册回调
VoidAuthAPI.registerCallback(new AuthCallbackAdapter() {
@Override
public void onAuthenticated(UUID uuid) { /* 登录成功 */ }
});
// 数据查询
Optional<PlayerData> data = VoidAuthAPI.getPlayerData(uuid);
Set<UUID> authenticated = VoidAuthAPI.getAuthenticatedPlayers();
boolean isAuth = VoidAuthAPI.isAuthenticated(uuid);
❓ 常见问题
Q: 没有安装 VoidAuth 的玩家能加入服务器吗?
A: 不能。未安装 VoidAuth 的客户端将被拒绝,并提示其安装该模组。
问:单人模式需要登录吗?
答:不需要。主机玩家在单人模式(包括局域网)中会自动完成身份验证。
问:如何切换存储类型?
答:修改 config/voidauth.json 中的 storageType 配置项并重启游戏。现有数据将自动迁移。
问:忘记密码怎么办?
答:管理员可以使用 /voidauth reset <player> 命令重置密码。
问:支持哪些 Minecraft 版本?
答:26.1、26.1.1 和 26.1.2。不兼容旧版本。
? 许可证
© 2025 VoidAuth。保留所有权利。
本模组为闭源软件。保留所有权利。未经作者事先书面授权,禁止以下行为:
- 对本软件进行反编译、逆向工程或反汇编
- 修改、改编或创作衍生作品
- 分发、重新授权或出售本软件的源代码
- 删除或更改本软件中的任何版权声明
用户被授予非独占、不可转让的许可,仅可将本软件用于个人和非商业用途进行安装和使用。
VoidAuth
Mandatory Authentication Mod for Minecraft 26.1–26.1.2 | Fabric | Both-Side Install
VoidAuth is a security authentication mod designed for the Minecraft 26.1 series, requiring both server and client installation. Beyond basic login/registration, it architecturally solves long-standing issues in traditional auth mods — flickering, death-state lockups, and elytra disconnect void traps — while providing full GUI management, fine-grained permissions, and a developer API.
? Quick Start
- Install Fabric Loader 0.19.2+ and Fabric API
- Place VoidAuth in both server and client
mods folders
- Start the server — config auto-generates at
config/voidauth.json
- Players join and type
/voidauth register <password> to register, then /voidauth login <password> each visit
- Type
/voidauth help to see all commands (clickable!)
? Uses JSON storage by default — zero dependencies, works out of the box. For SQLite/MySQL, just drop the driver jar into the mods folder.
? Requirements
| Item |
Requirement |
| Minecraft |
26.1 / 26.1.1 / 26.1.2 |
| Java |
25 |
| Fabric Loader |
0.19.2+ |
| Fabric API |
0.145.1+26.1 |
⚠️ Mandatory both-side install — Clients without VoidAuth will be rejected and prompted to install it.
✨ Unique Features at a Glance
These features are not found in other Minecraft authentication mods:
| # |
Feature |
One-Liner |
| ? |
4-Layer Position Lock |
Client input freeze + server position sync + move packet intercept + deviation correction — eliminates flickering and X-ray |
| ? |
Darkness Anti-Bypass |
Darkness effect + forced gamma=0 + F3 screen block — even Fullbright can't see through |
| ? |
Elytra Disconnect Protection |
Auto-loads 7×7 chunks on join, prevents void trap after elytra disconnect |
| ? |
Death-State Auto-Recovery |
Detects death on logout and auto-respawns on rejoin — no admin intervention needed |
| ⏱️ |
Flight Check Grace Period |
Configurable grace period after login suppresses fly-hack detection during falling/elytra glide |
| ?️ |
BCrypt Truncation Guard |
Validates password UTF-8 length ≤ 72 bytes, closes the silent BCrypt truncation vulnerability |
| ? |
Sequential Character Detection |
Blocks abc/123/cba/321 patterns — rejects weak passwords |
| ? |
Admin Audit Log |
All admin actions auto-logged, one-click export with timestamp |
| ? |
Fine-Grained Permission Nodes |
7 independent permission nodes, supports Fabric Permissions API |
| ? |
Developer API |
Callback system + data queries + exception isolation for third-party mod integration |
| ? |
Auto Migration |
Config and data auto-migrate on upgrade or storage type switch |
| ?️ |
MySQL Password Protection |
Config sync uses placeholder ***, prevents password leak via network |
| ⚙️ |
bcryptCostFactor Validation |
Server enforces range 10–14, prevents DoS via malicious cost factor |
? Unique Features in Detail
? 4-Layer Position Lock — Eliminates Login Flickering & X-Ray
Traditional auth mods only intercept move packets server-side, leaving the client free to move — causing flickering and X-ray. VoidAuth implements four coordinated layers:
- ClientInputMixin — Freezes all keyboard/mouse input
- tickFreeze() + LockPositionPacket — Locks client to server-specified position, zero velocity + no gravity + render interpolation lock
- ServerPlayHandlerMixin — Intercepts all move and vehicle move packets
- ServerPlayerEntityMixin — Actively corrects position deviation, resets fly-check counters
Key innovation: A dedicated LockPositionPayload network packet syncs the server-side coordinates to the client, preventing block-embedding caused by position desync.
? Darkness Anti-Bypass
Traditional mods use Blindness, which Fullbright resource packs easily bypass. VoidAuth uses triple protection:
- Darkness effect — Cannot be penetrated even with max brightness
- Client gamma forced to 0 — Locks render brightness during login, restores after
- F3 debug screen blocked — Prevents coordinate and entity info leaks
⏱️ Flight Check Grace Period
After login, players may still be falling or gliding with elytra. Traditional mods immediately trigger fly-hack detection and kick them. VoidAuth provides a configurable grace period (flightCheckGracePeriodSeconds) that suppresses flight checks, letting players land safely.
? Elytra Disconnect Protection
When a player disconnects mid-elytra-flight and rejoins, traditional mods leave them stuck in the void (chunks not loaded). VoidAuth proactively loads a 7×7 chunk area around the player on join.
? Death-State Auto-Recovery
Players who die and disconnect get stuck in a "dead" state on rejoin with traditional mods. VoidAuth records the death state on logout and auto-executes respawn on rejoin.
?️ BCrypt 72-Byte Truncation Guard
BCrypt silently truncates passwords beyond 72 bytes. Attackers can exploit this prefix collision to access other accounts. VoidAuth validates UTF-8 byte length and rejects passwords exceeding 72 bytes.
? Sequential Character Detection
Beyond requiring letters + digits, VoidAuth detects ascending/descending sequences (e.g. abc, 123, cba, 321) to reject weak passwords.
? Admin Audit Log
All admin actions are automatically logged to logs/voidauth-admin.log. Export a timestamped copy with /voidauth exportlog.
? Fine-Grained Permission Nodes
| Permission Node |
Action |
voidauth.admin.reset |
Reset player password |
voidauth.admin.setpassword |
Force-set password |
voidauth.admin.delete |
Delete player account |
voidauth.admin.list |
View player list |
voidauth.admin.reload |
Reload config |
voidauth.admin.config |
Modify config |
voidauth.admin.exportlog |
Export admin log |
Falls back to OP check when Fabric Permissions API is not installed.
? Developer API & Callback System
VoidAuthAPI.registerCallback(new AuthCallbackAdapter() {
@Override
public void onAuthenticated(UUID uuid) { /* Login success */ }
});
Set<UUID> authenticated = VoidAuthAPI.getAuthenticatedPlayers();
Optional<PlayerData> data = VoidAuthAPI.getPlayerData(uuid);
AuthCallbackAdapter provides empty implementations for selective override
- Callback exceptions are auto-isolated — one failing callback won't affect others
? Auto Migration
- Config: Automatic version migration on mod upgrade — no lost settings
- Data: Automatic migration when switching storage type (JSON → SQLite → MySQL)
?️ MySQL Password Protection
Config sync packets replace the MySQL password with ***. The server only updates the password when the client sends a non-empty, non-placeholder value.
⚙️ bcryptCostFactor Validation
Server enforces BCrypt cost factor range 10–14, preventing DoS via maliciously high values.
? Full Feature List
Player Commands
| Command |
Description |
Click Behavior |
/voidauth login <password> |
Login |
Fills command, type password |
/voidauth register <password> |
Register |
Fills command, type password |
/voidauth info |
View personal info |
Click to execute |
/voidauth changepassword |
Open change password GUI |
Click to execute |
/voidauth email |
Open email management GUI |
Click to execute |
/voidauth unregister |
Delete account (requires confirmation) |
Fills command, confirm after prompt |
/voidauth help |
Show help menu |
Click to execute |
Admin Commands
| Command |
Description |
Permission |
Click Behavior |
/voidauth reset <player> |
Reset player password |
voidauth.admin.reset |
Fills command, type player name |
/voidauth setpassword <player> <password> |
Force-set password |
voidauth.admin.setpassword |
Fills command, type name & password |
/voidauth list [page] |
View registered players |
voidauth.admin.list |
Click to execute |
/voidauth delete <player> |
Delete player account |
voidauth.admin.delete |
Fills command, type player name |
/voidauth reload |
Reload config |
voidauth.admin.reload |
Click to execute |
/voidauth config |
Open config GUI |
voidauth.admin.config |
Click to execute |
/voidauth exportlog |
Export admin log |
voidauth.admin.exportlog |
Click to execute |
? All commands in the help menu are clickable. Commands requiring parameters auto-fill into the chat bar.
GUI Screens
- Login Screen — With countdown timer, auto-kick on timeout
- Register Screen — Optional email binding during registration
- Change Password Screen — Old + new + confirm password fields
- Email Management Screen — Bind / change / unbind modes
- Config Management Screen — Visual editor for all settings
- Account Management Screen — Unified entry point
Security
- BCrypt password hashing (configurable cost factor 10–14)
- Password strength validation (min 6 chars + letters & digits + sequential char detection + 72-byte cap)
- Login failure lockout (configurable attempts & duration)
- Same-IP auto-login (configurable validity period)
- Account deletion with confirmation + effect cleanup + data purge
Data Storage
| Storage |
Description |
Dependency |
| JSON |
Default, zero-dependency |
None |
| SQLite |
For small-medium servers |
Install sqlite-jdbc in mods folder |
| MySQL |
For large servers / multi-server |
Install mysql-connector-j in mods folder |
Data auto-migrates when switching storage type. Falls back to JSON with a warning if driver is missing.
? Optional Dependencies
Auto-fallback to defaults (JSON storage + OP permission check) when not installed. Core features unaffected.
⚙️ Configuration
| Setting |
Default |
Description |
loginTimeoutSeconds |
120 |
Login timeout (seconds) |
maxPasswordAttempts |
5 |
Max password attempts |
lockDurationMinutes |
30 |
Account lock duration (minutes) |
bcryptCostFactor |
10 |
BCrypt cost factor (10–14) |
ipAutoLoginEnabled |
true |
Enable same-IP auto-login |
ipAutoLoginDurationHours |
24 |
Auto-login validity (hours) |
storageType |
json |
Storage type (json/sqlite/mysql) |
flightCheckGracePeriodSeconds |
30 |
Flight check grace period (seconds) |
mysqlHost |
localhost |
MySQL host |
mysqlPort |
3306 |
MySQL port |
mysqlDatabase |
voidauth |
MySQL database name |
mysqlUsername |
root |
MySQL username |
mysqlPassword |
|
MySQL password |
mysqlPoolSize |
5 |
MySQL connection pool size |
? Developer API
// Add dependency
dependencies {
modImplementation "com.voidauth:voidauth:1.0.0"
}
// Register callback
VoidAuthAPI.registerCallback(new AuthCallbackAdapter() {
@Override
public void onAuthenticated(UUID uuid) { /* Login success */ }
});
// Data queries
Optional<PlayerData> data = VoidAuthAPI.getPlayerData(uuid);
Set<UUID> authenticated = VoidAuthAPI.getAuthenticatedPlayers();
boolean isAuth = VoidAuthAPI.isAuthenticated(uuid);
❓ FAQ
Q: Can players join without VoidAuth installed?
A: No. Clients without VoidAuth are rejected and prompted to install it.
Q: Do I need to login in singleplayer?
A: No. The host player auto-authenticates in singleplayer (including LAN).
Q: How do I switch storage type?
A: Change storageType in config/voidauth.json and restart. Existing data auto-migrates.
Q: What if I forget my password?
A: Admins can use /voidauth reset <player> to reset it.
Q: Which Minecraft versions are supported?
A: 26.1, 26.1.1, and 26.1.2. Not compatible with older versions.
? License
© 2025 VoidAuth. All Rights Reserved.
This mod is closed-source software. All rights are reserved. Without prior written authorization from the author, the following are prohibited:
- Decompiling, reverse engineering, or disassembling this software
- Modifying, adapting, or creating derivative works
- Distributing, re-licensing, or selling the source code of this software
- Removing or altering any copyright notices in this software
Users are granted a non-exclusive, non-transferable license to install and use this software solely for personal, non-commercial purposes.
评论 0
登录后参与评分
还没有评论,来抢沙发吧