? Inventory Advancement Accelerator
当服务器拥有大量进度项、数据包或在线玩家时,原版 Minecraft 会频繁遍历相关的进度判定条件。本模组为每位玩家创建了物品索引,仅过滤可能与当前库存变化相匹配的条件,同时继续使用 Minecraft 原版谓词和奖励逻辑进行最终评估。
简单来说:减少不必要的检查,同时保留原版行为。⚡
? 大幅减少候选检查次数
根据玩家库存中实际发生变化的物品来定位相关的进度条件,避免了每次对所有监听器进行全量扫描。
? 精确的原版评估
最终的匹配仍由 Minecraft 原版的 TriggerInstance、ItemPredicate 和上下文谓词执行。原版奖励逻辑未被替换。
? 支持复杂物品条件
正确处理物品数量、标签、数据组件、空槽位变化、物品移除以及多种条件的组合。
?️ 仅需服务端安装
客户端无需安装此模组。原版客户端可直接连接至服务器。
?️ 安全回退机制
当遇到未知条件、异步调用、资源重载、Mixin 注入失败或内部异常时,模组会保留或回退到原版处理流程。
? 影子验证与熔断保护
默认情况下,模组会对优化结果与完整评估结果进行抽样比对。若检测到不匹配,则使用完整结果,且模组可自动禁用受影响的索引或切换回原版模式。
? 内置运行时指标
查看触发次数、候选缩减比例、全量扫描次数、回退原因、延迟分布以及最活跃的玩家和物品。
? 不修改世界数据
模组不添加玩家附件(attachments)、能力(capabilities)、存档格式变更或网络通道。移除模组时无需迁移存档。
该项目包含一个确定性的候选层微基准测试,配置如下:
- 5,000 个物品条件监听器
- 1,000 个唯一物品 ID
- 50 个模拟玩家
- 每次操作每位玩家更改一种物品类型
测试结果:
- 平均每次操作生成约 5.014 个候选条件
- 候选数量减少约 99.9%
- 候选层测试速度提升约 4.04 倍
⚠️ 这些结果来自候选过滤层的微基准测试,并不意味着每个服务器都会获得相同的 MSPT 改善。实际性能取决于数据包、进度项数量、在线玩家数量以及整合包环境。
首次启动后,NeoForge 会生成:
config/invadvopt-common.toml
默认启用安全的 EXACT 模式:
mode = "EXACT"
enabled = true
shadowVerifyRate = 0.01
periodicFullScanTicks = 200
fallbackOnUnknownPredicate = true
fallbackOnOffThreadCall = true
disableOnMismatch = true
metricsEnabled = true
debugLogging = false
若要立即禁用优化,请将模式切换为 VANILLA。无需卸载模组或重启服务器。
以下命令需要服务器管理员权限等级 4:
/invadvopt status
/invadvopt stats
/invadvopt verify
/invadvopt mode vanilla
/invadvopt mode exact
/invadvopt reset-stats
? Minecraft 1.21.1
? NeoForge 21.1.x
☕ Java 21
?️ 专用服务器
? 无需客户端安装
将模组 JAR 文件放入服务器的 mods 文件夹并启动服务器即可。
该模组专为混合 NeoForge/Bukkit/Paper 服务器环境设计,包括诸如 Youer 等服务器:
- 不使用
@Overwrite
- 不依赖 Bukkit 内部实现
- 不使用
Unsafe 或 ClassLoader 黑客技术
- 当 Mixin 目标变更时自动保留原版逻辑
- 提供抽样验证和熔断保护以应对可能的运行时差异
以下类似的进度优化模组与本模组不兼容:
achiopt
cerulean
icterine
当检测到冲突时,本模组会记录错误日志并保留原版的触发处理流程。
本模组特别适用于:
? 拥有大型数据包的服务器
? 拥有大量自定义进度的整合包
? 多人生存服务器
? 经常修改玩家库存的模组服务器
? 希望降低进度评估开销的服务器
您可以通过以下方式随时恢复:
- 使用
/invadvopt mode vanilla 切换回原版模式
- 在配置文件中设置
mode = "VANILLA"
- 停止服务器并直接移除模组 JAR 文件
380 个模组的服务器实测结果:

? Inventory Advancement Accelerator
When a server has a large number of advancements, data packs, or online players, vanilla Minecraft frequently iterates through the relevant advancement conditions. This mod creates a per-player item index and filters only the conditions that may match the current inventory change, while continuing to use Minecraft’s vanilla predicates and reward logic for the final evaluation.
Simply put: fewer unnecessary checks, while preserving vanilla behavior. ⚡
? Significantly Fewer Candidate Checks
Relevant advancement conditions are located based on the items that actually changed in the player’s inventory, avoiding a full scan of every listener each time.
? Precise Vanilla Evaluation
Final matching is still performed by Minecraft’s vanilla TriggerInstance, ItemPredicate, and context predicates. The vanilla reward logic is not replaced.
? Support for Complex Item Conditions
Correctly handles item counts, tags, data components, empty-slot changes, item removal, and combinations of multiple conditions.
?️ Server-Side Installation Only
Clients do not need to install this mod. Vanilla clients can connect to the server directly.
?️ Safe Fallback Mechanism
When unknown conditions, asynchronous calls, resource reloads, Mixin injection failures, or internal exceptions are encountered, the mod preserves or falls back to the vanilla processing flow.
? Shadow Verification and Circuit-Breaker Protection
By default, the mod samples and compares optimized results against full evaluation results. If a mismatch is detected, the full result is used, and the mod can automatically disable the affected index or switch back to vanilla mode.
? Built-In Runtime Metrics
View trigger counts, candidate reduction ratios, full-scan counts, fallback reasons, latency distributions, and the most active players and items.
? No World Data Modifications
The mod does not add player attachments, capabilities, save-format changes, or network channels. Removing the mod does not require save migration.
The project includes a deterministic candidate-layer microbenchmark with:
- 5,000 item-condition listeners
- 1,000 unique item IDs
- 50 simulated players
- One item type changed per player per operation
Test results:
- Approximately 5.014 candidate conditions generated per operation on average
- Approximately 99.9% reduction in candidate count
- Approximately 4.04× speedup in candidate-layer testing
⚠️ These results are from a microbenchmark of the candidate-filtering layer and do not mean that every server will receive the same MSPT improvement. Actual performance depends on data packs, advancement count, online player count, and the modpack environment.
After the first startup, NeoForge generates:
config/invadvopt-common.toml
The safe EXACT mode is enabled by default:
mode = "EXACT"
enabled = true
shadowVerifyRate = 0.01
periodicFullScanTicks = 200
fallbackOnUnknownPredicate = true
fallbackOnOffThreadCall = true
disableOnMismatch = true
metricsEnabled = true
debugLogging = false
To disable the optimization immediately, switch the mode to VANILLA. You do not need to uninstall the mod or restart the server.
The following commands require server administrator permission level 4:
/invadvopt status
/invadvopt stats
/invadvopt verify
/invadvopt mode vanilla
/invadvopt mode exact
/invadvopt reset-stats
? Minecraft 1.21.1
? NeoForge 21.1.x
☕ Java 21
?️ Dedicated Server
? No Client Installation Required
Place the mod JAR in the server’s mods folder and start the server.
The mod is specifically designed with hybrid NeoForge/Bukkit/Paper server environments in mind, including servers such as Youer:
- Does not use
@Overwrite
- Does not depend on Bukkit internals
- Does not use
Unsafe or ClassLoader hacks
- Automatically preserves vanilla logic when Mixin targets change
- Provides sampled verification and circuit-breaker protection for possible runtime differences
The following similar advancement-optimization mods are incompatible with this mod:
achiopt
cerulean
icterine
When a conflict is detected, this mod logs an error and preserves the vanilla trigger-processing flow.
This mod is especially suitable for:
? Servers with large data packs
? Modpacks with a large number of custom advancements
? Multiplayer survival servers
? Modded servers that frequently modify player inventories
? Servers seeking to reduce advancement-evaluation overhead
You can revert at any time by:
- Using
/invadvopt mode vanilla to switch back to vanilla mode
- Setting
mode = "VANILLA" in the configuration file
- Stopping the server and removing the mod JAR directly
Real-World Test Results on a Server with 380 Mods:

评论 0
登录后参与评分
还没有评论,来抢沙发吧