修复 CraftTweaker 删除配方后被 OOI 后处理重写的问题#10
Draft
wu-xiao-ya wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
在安装 CraftTweaker / ModTweaker 的整合包中,OOI 会在
FMLLoadCompleteEvent阶段执行MatchItemHandler.postODProcess()。这个时机可能晚于 CraftTweaker / ModTweaker 的配方删除动作,导致已经被脚本删除的机器配方输入又被 OOI 的矿辞统一逻辑重写。
实际表现是:首次进入游戏时部分配方仍然存在,但执行
/ct reload后配方才会正确消失。修改内容
postInit中重复执行。CraftTweaker#onPostInit开头触发 OOI 初始化。clearDuplicateRecipes:控制是否执行重复工作台配方清理。initializeBeforeCraftTweakerActions:控制是否在 CraftTweaker 应用动作前完成 OOI 堆栈统一。processOreDictionaryAtLoadComplete:控制是否继续在 LoadComplete 阶段执行矿辞后处理。验证
/ct reload。javac -proc:none编译验证。