Skip to content

fix: Create fan's smoking/blasting recipe don't show in EMI - #54

Merged
Nolij merged 3 commits into
Nolij:masterfrom
TonyCrane:master
Apr 2, 2026
Merged

fix: Create fan's smoking/blasting recipe don't show in EMI#54
Nolij merged 3 commits into
Nolij:masterfrom
TonyCrane:master

Conversation

@TonyCrane

Copy link
Copy Markdown
Contributor

Fixes #24, Fixes #47

Create's fan smoking and blasting category using vanilla RecipeType as recipe type. But they are added to runtime.ignoredRecipes through VanillaPluginMixin, so when adding fan smoking/blasting recipes, they are ignored. Resulting blasting and smoking not shown in EMI Categories.

This PR adds one more check before ignoring. If the category is not in vanillaJEITypeEMICategoryMap, the recipe will still be added.

Tested by add create to runtime only mods and ./gradlew :20.1-lexforge:runClient:

image

@github-actions

github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown

DCO Assistant Lite bot All contributors have read and affirmed the entire contents of the Developer Certificate of Origin.

@TonyCrane

Copy link
Copy Markdown
Contributor Author

I have read and hereby affirm the entire contents of the Developer Certificate of Origin.

@Nolij

Nolij commented Mar 20, 2026

Copy link
Copy Markdown
Owner

How much and in what way does dd3cd94 actually help performance? Seems excessive.

EDIT: To be clear, having a method for checking that seems like a good idea for code cleanliness, but caching the output I'm not sure about.

@TonyCrane

Copy link
Copy Markdown
Contributor Author

The first commit contained the actual changes. But a friend of mine familiar with EMI told me that checking a hash map for the key every time a recipe is added might impact game loading performance, especially if there are a lot recipes.

Since many recipes share the same category, and whether a recipe belongs to a vanilla item is a category attribute, not a recipe attribute. Therefore, placing the isVanilla check within the category and calculating it only the first time it's needed reduces the number of containsKey checks from the recipe count to the category count.

I haven't actually tested the performance improvement in practice, but theoretically, it should be effective, at least better than finding keys every time.

@Nolij

Nolij commented Mar 20, 2026

Copy link
Copy Markdown
Owner

The first commit contained the actual changes. But a friend of mine familiar with EMI told me that checking a hash map for the key every time a recipe is added might impact game loading performance, especially if there are a lot recipes.

Since many recipes share the same category, and whether a recipe belongs to a vanilla item is a category attribute, not a recipe attribute. Therefore, placing the isVanilla check within the category and calculating it only the first time it's needed reduces the number of containsKey checks from the recipe count to the category count.

I haven't actually tested the performance improvement in practice, but theoretically, it should be effective, at least better than finding keys every time.

Could I get you to revert that, and leave the caching to me? I'd prefer to do it differently, but I need to tinker around with it myself to figure out how exactly I want to do it.

@TonyCrane

Copy link
Copy Markdown
Contributor Author

Done. I'm not familiar with this, so it's obviously better for you to consider it. Thanks for that.

@Nolij
Nolij merged commit 4bcc79f into Nolij:master Apr 2, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Bulk Blasting & Smelting Recipes are Hidden missing create's encased fan with lava recipes visibility

2 participants