WorldOptimiser
自动优化世界以兼容 ReplayMod
一款 Minecraft Forge 模组,在检测到模组变更时自动优化世界,专门用于解决 ReplayMod 方块 ID 不匹配的问题。
? 用途
本模组旨在解决 ReforgedPlay Mod(版本 0.3.1)中的一个关键问题:当添加或移除包含方块、模型或纹理的模组时,ReplayMod 会在回放录像中显示错误的纹理和模型。
问题所在
- ReplayMod 运行完美:当世界使用固定的模组列表生成时
- 出现问题:当你添加或移除包含方块、模型或纹理的模组时
- 这会改变引用 ID 列表,导致 ReplayMod 混淆方块 ID
- 之前的手动修复方法:下载世界 → 在单人游戏中打开 → 手动优化 → 重新上传
- 这在服务器环境中既繁琐又有风险,因为服务器需要动态更改模组
解决方案
WorldOptimiser 自动检测模组列表的变化,并触发通常需要通过单人游戏中的“优化世界”按钮手动执行的 world 优化过程。这将重新校准 ID 映射,并修复 ReplayMod 兼容性问题。
✨ 功能
- 自动检测:监控模组的添加、移除和版本变更
- 智能优化:仅在检测到实际的模组变更时运行
- 服务端支持:适用于专用服务器和集成服务器
- 无侵入性:在世界启动期间无缝地在后台运行
- 回放安全:确保模组变更后,你的 ReplayMod 录播能正确显示
? 工作原理
- 启动检查:世界加载时,模组从
level.dat 读取已保存的模组列表
- 比较:将已保存的模组列表与当前加载的模组进行比较
- 检测:识别任何添加、移除或版本变更
- 优化:如果检测到变更,则自动运行世界优化过程
- 完成:世界使用更新后的 ID 映射正常启动
? 要求
- Minecraft: 1.20.1
- Forge: 47.4.0 或更高版本
- Java: 17+
? 安装
- 从发布页面下载最新版本
- 将
worldoptimiser-1.0.jar 放入你的 mods 文件夹
- 启动服务器/世界 - 模组将在需要时自动处理优化
? 使用方法
无需配置!模组自动工作:
- 安装模组
- 根据需要添加/移除其他模组
- 启动你的世界 - 如果检测到模组变更,优化会自动发生
- 你的 ReplayMod 录播现在将正确显示
? 日志输出
当模组检测到变更时,你会看到类似以下的消息:
[Server thread/WARN] [worldoptimiser]: Detected new mods world will be optimised on startup
[Server thread/INFO] [worldoptimiser/worldupgrader]: World will be optimised it may take a while, please wait...
[Server thread/INFO] [worldoptimiser/worldupgrader]: World optimisation complete
? 已知问题
- 大型世界的优化可能需要一些时间
- 该过程会阻塞世界启动直到完成(这是正确重新映射 ID 所必需的)
?? 专为以下人员创建
本模组是专门为 @protagnst 创建的,以解决其内容创作工作流程中的 ReplayMod 兼容性问题。
? 定制开发
需要针对你特定用例的定制模组解决方案吗?我提供付费的定制 Minecraft 模组开发及类似技术解决方案。
联系方式:接受定制开发工作 - 如果你有类似的问题需要解决,请联系我!
? 技术细节
- 模组 ID:
worldoptimiser
- 版本: 1.0
- 作者: Pelotrio
- 许可证: 保留所有权利
兼容性说明
此问题特定于 Forge 1.20.1 上的 ReforgedPlay Mod v0.3.1。早期版本(Forge 1.16.5 和 Fabric 版本)会自动处理 ID 变更,但此功能在 1.20.1 Forge 版本中丢失。
? 对于开发者
该模组挂钩到 Forge 的模组加载事件和世界启动流程,以:
- 通过
ModMismatchEvent 检测模组列表变更
- 读取/比较存储在世界 NBT 数据中的模组列表
- 在需要时触发 Minecraft 内置的
WorldUpgrader
- 确保与 ReplayMod 的方块 ID 系统兼容
本模组解决了 ReplayMod 兼容性的特定技术问题。如果你在模组变更后遇到类似的方块 ID 或纹理映射问题,此工具自动化了以前所需的手动优化过程。
WorldOptimiser
Automatic World Optimization for ReplayMod Compatibility
A Minecraft Forge mod that automatically optimizes worlds when mod changes are detected, specifically designed to solve ReplayMod block ID mismatch issues.
? Purpose
This mod was created to solve a critical issue with ReforgedPlay Mod (version 0.3.1) where adding or removing mods that contain blocks, models, or textures causes ReplayMod to display incorrect textures and models in replay recordings.
The Problem
- ReplayMod works perfectly when a world is generated with a fixed set of mods
- Issues arise when you add or remove mods containing blocks, models, or textures
- This changes the reference ID list, causing ReplayMod to jumble block IDs
- Previous manual fix: Download world → Open in singleplayer → Manually optimize → Re-upload
- This was tedious and risky for server environments where mods need to be changed on-the-fly
The Solution
WorldOptimiser automatically detects mod list changes and triggers the world optimization process that you would normally do manually through the "Optimize World" button in singleplayer. This recalibrates the ID mappings and fixes ReplayMod compatibility issues.
✨ Features
- Automatic Detection: Monitors for mod additions, removals, and version changes
- Smart Optimization: Only runs when actual mod changes are detected
- Server-Side: Works on both dedicated servers and integrated servers
- Non-Intrusive: Runs seamlessly in the background during world startup
- Replay-Safe: Ensures your ReplayMod recordings display correctly after mod changes
? How It Works
- Startup Check: When a world loads, the mod reads the saved mod list from
level.dat
- Comparison: Compares the saved mod list with currently loaded mods
- Detection: Identifies any additions, removals, or version changes
- Optimization: Automatically runs the world optimization process if changes are detected
- Completion: World starts normally with updated ID mappings
? Requirements
- Minecraft: 1.20.1
- Forge: 47.4.0 or higher
- Java: 17+
? Installation
- Download the latest release from the releases page
- Place
worldoptimiser-1.0.jar in your mods folder
- Start your server/world - the mod will automatically handle optimization when needed
? Usage
No configuration required! The mod works automatically:
- Install the mod
- Add/remove other mods as needed
- Start your world - optimization happens automatically if mod changes are detected
- Your ReplayMod recordings will now display correctly
? Log Output
When the mod detects changes, you'll see messages like:
[Server thread/WARN] [worldoptimiser]: Detected new mods world will be optimised on startup
[Server thread/INFO] [worldoptimiser/worldupgrader]: World will be optimised it may take a while, please wait...
[Server thread/INFO] [worldoptimiser/worldupgrader]: World optimisation complete
? Known Issues
- World optimization can take some time for large worlds
- The process blocks world startup until completion (this is necessary for proper ID remapping)
?? Created For
This mod was specifically created for @protagnst to solve ReplayMod compatibility issues in their content creation workflow.
? Custom Development
Need a custom mod solution for your specific use case? I'm available for hire for custom Minecraft mod development and similar technical solutions.
Contact: Available for custom development work - reach out if you have similar issues that need solving!
? Technical Details
- Mod ID:
worldoptimiser
- Version: 1.0
- Author: Pelotrio
- License: All Rights Reserved
Compatibility Note
This issue was specific to ReforgedPlay Mod v0.3.1 on Forge 1.20.1. Previous versions (Forge 1.16.5 and Fabric versions) handled ID changes automatically, but this functionality was lost in the 1.20.1 Forge version.
? For Developers
The mod hooks into Forge's mod loading events and world startup to:
- Detect mod list changes via
ModMismatchEvent
- Read/compare mod lists stored in world NBT data
- Trigger Minecraft's built-in
WorldUpgrader when needed
- Ensure compatibility with ReplayMod's block ID system
This mod solves a specific technical issue with ReplayMod compatibility. If you're experiencing similar block ID or texture mapping issues after mod changes, this tool automates the manual optimization process that was previously required.
评论 0
登录后参与评分
还没有评论,来抢沙发吧