Clear categoryMap on reload to reload EMI correctly#4683
Merged
jurrejelle merged 1 commit intoGregTechCEu:1.20.1from Feb 23, 2026
Merged
Clear categoryMap on reload to reload EMI correctly#4683jurrejelle merged 1 commit intoGregTechCEu:1.20.1from
jurrejelle merged 1 commit intoGregTechCEu:1.20.1from
Conversation
EMI reads from categoryMap Fixes GregTechCEu#4682
YoungOnionMC
approved these changes
Feb 23, 2026
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.
What
Adds a categoryMap.clear() in the /reload flow to clear the categoryMap, which is necessary for EMI to refresh properly. EMI reads its data from categoryMap
Fixes #4682
Implementation Details
I need a context in which categoryMap is accessible, so I added a beginStagingRecipes method to GTRecipeType which then calls additionHandler.beginStaging in the body, instead of calling the additionHandler directly from the KubeJSPlugin or the mixin.
Outcome
/reload correctly populates EMI now
How Was This Tested
Fresh instance with GT 7.5.2, EMI, and KubeJS, single kubejs script with a simple recipe.
Additional Information
Bug was introduced in #3981 by the deletion of GTRecipeLookup, which still called this.recipeType.getCategoryMap().clear();
The new RecipeDB system never deleted categoryMap.