Skip to content

Comments

Clear categoryMap on reload to reload EMI correctly#4683

Merged
jurrejelle merged 1 commit intoGregTechCEu:1.20.1from
Mqrius:feature/reload-fix
Feb 23, 2026
Merged

Clear categoryMap on reload to reload EMI correctly#4683
jurrejelle merged 1 commit intoGregTechCEu:1.20.1from
Mqrius:feature/reload-fix

Conversation

@Mqrius
Copy link
Contributor

@Mqrius Mqrius commented Feb 22, 2026

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.

EMI reads from categoryMap
Fixes GregTechCEu#4682
@YoungOnionMC YoungOnionMC added type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Feb 23, 2026
@jurrejelle jurrejelle merged commit 53cf5b1 into GregTechCEu:1.20.1 Feb 23, 2026
6 of 7 checks passed
@Mqrius Mqrius deleted the feature/reload-fix branch February 23, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doing KubeJS /reload for existing recipes won't update EMI

3 participants