CobbleOptimizer
一个适用于 Minecraft 1.21.1 的服务端 Fabric 模组,用于优化 Cobblemon(宝可梦模组)实体性能,其机制基于服务器负载(TPS)。它具备四大核心功能:
- 刻率节流(Tick Throttle)——降低远处/非重要宝可梦实体的刻更新频率。当服务器 TPS 下降时,远离玩家的宝可梦会减少其刻更新速率,从而节省 CPU 资源。
- AI 冻结(AI Freeze)——完全冻结远离任何玩家的宝可梦实体的 AI。如果没有人在附近观察它们,就没有必要运行其寻路和行为逻辑。
- 自适应生成(Adaptive Spawn)——根据当前服务器 TPS 动态调整宝可梦的生成速率。当服务器吃力时,生成的宝可梦数量减少;当服务器状态良好时,生成率恢复正常。
- 批量移除(Batch Despawn)——在服务器过载时批量移除多余的宝可梦实体,优先移除不重要的实体(非闪光、非传说、未被拥有、未处于战斗中)。
共享基础设施
- TPS 监控器 —— 持续跟踪服务器 TPS,为所有功能提供数据支持。
- 玩家追踪器 —— 缓存玩家与实体之间的距离,以便多个功能以较低开销检查邻近关系。
- 配置文件 —— 基于 TOML 格式的配置文件,并支持通过游戏内命令(/cobbleoptimizer)实时调整阈值。
简而言之
这是一款性能优化模组,通过在服务器负载较高时智能地缩减宝可梦实体的处理量,确保 Cobblemon 服务器流畅运行,同时保护重要宝可梦(闪光、传说、战斗中、已拥有)免受过度优化。
CobbleOptimizer
A server-side Fabric mod for Minecraft 1.21.1 that optimizes Cobblemon (the Pokemon mod) entity performance based on server load (TPS). It has 4 main
features:
- Tick Throttle — Reduces how often distant/unimportant Pokemon entities are ticked. When the server TPS drops, Pokemon far from players get their tick rate reduced, saving CPU cycles.
- AI Freeze — Completely freezes the AI of Pokemon entities that are far from any player. If no one is nearby to observe them, there's no need to run their pathfinding and behavior logic.
- Adaptive Spawn — Dynamically adjusts Pokemon spawn rates based on current server TPS. When the server is struggling, fewer Pokemon spawn; when it's healthy, spawns return to normal.
- Batch Despawn — Removes excess Pokemon entities in bulk when the server is overloaded, prioritizing removal of unimportant ones (non-shiny, non-legendary, unowned, not in battle).
Shared Infrastructure
- TPS Monitor — Continuously tracks server TPS to inform all features.
- Player Tracker — Caches player-to-entity distances so multiple features can cheaply check proximity.
- Config — TOML-based configuration with in-game commands (/cobbleoptimizer) to tweak thresholds on the fly.
In short
It's a performance optimization mod that keeps Cobblemon servers running smoothly by intelligently scaling back Pokemon entity processing when the server is under load, while protecting important Pokemon (shinies, legendaries, battling, owned) from aggressive optimization.
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
下载 CobblemonOptimizer
CobbleOptimizer 5.0.0 — Cobblemon 1.8 更新
Minecraft 1.21.1 · Cobblemon 1.8.x · Fabric + NeoForge
▎ ⚠️ 需要 Cobblemon 1.8.0 或更高版本。在 Cobblemon .3 上无法加载,请停留在 4.8.0。
✨ 新增
- 更智能的生成节流机制。Adaptive Spawn(自适应生成)现在会跳过整个生成流程中的全部工作:不进行区域扫描、不进行条件检查、也不进行宝可梦生成。此前,它仅在最后阶段取消生成,而服务器此时已承担了完整的性能开销。
- 保持与之前相同的生成速率曲线(healthy_tps / critical_tps)
- 生成速度平滑下降,而非以突发形式出现
- 钓鱼和 PokeSnack(宝可梦零食)的生成不受影响
- 紧急模式仍然阻止所有生成
- /cobbleoptimizer status 现在显示有多少次生成循环被跳过
- 服务器启动时会检查是否成功附加了生成钩子,若未附加则记录警告日志
- 新增选项:adaptive_spawn.throttle_spawn_passes(默认行为)
- 为 Cobblemon 1.8 的乘客位置骑乘数据包添加了新的线程安全补丁。它与现有的骑乘状态补丁一样,获得了主线程保护。 新增选项:patches.thread_safe_passenger_position(默认关闭)
? 更改
- 已更新至 Cobblemon 1.8。每个补丁均已针对该版本进行检查。
- 移除了两个已由 Cobblemon 1.8 原生处理的补丁:
- Berry ticker 优化
- PokemonStore UUID 缓存
- 修复:near_player_spawn_protect_radius 参数无法修改的问题(默认值仍为 16 格)。
- Cobblemon 依赖项现已限制为 1.8.x 版本,以防止未经测试的未来版本意外加载并导致静默故障。
其余功能保持不变:Tick Throttle(刻节流)、AI Freeze(AI 冻结)、Batch Despawn(批量移除)、紧急模式,以及所有缓存和错误修复补丁。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧