fix: Create fan's smoking/blasting recipe don't show in EMI - #54
Conversation
|
DCO Assistant Lite bot All contributors have read and affirmed the entire contents of the Developer Certificate of Origin. |
|
I have read and hereby affirm the entire contents of the Developer Certificate of Origin. |
|
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. |
|
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 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. |
This reverts commit dd3cd94.
|
Done. I'm not familiar with this, so it's obviously better for you to consider it. Thanks for that. |
Fixes #24, Fixes #47
Create's fan smoking and blasting category using vanilla
RecipeTypeas recipe type. But they are added toruntime.ignoredRecipesthroughVanillaPluginMixin, 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: