Background
Previously I reported in [#451] that EMI favorites counts were incorrectly including Sophisticated Storage items as player inventory
items (now fixed).
After testing, the original fix introduced a regression: when a Sophisticated Storage does not have a crafting upgrade installed,
materials missing from the recipe tree are not highlighted in the storage, whereas vanilla chests do highlight them correctly.
Thanks to @P3pp3rF1y for promptly fixing this issue.
Latest Fix
In the latest version (1.4.18+), only getInputSources() in EmiGridMenuInfo.java needs to be modified:
@Override
public List<Slot> getInputSources(C handler) {
ArrayList<Slot> filterSlot = new ArrayList<>(
handler.realInventorySlots.strea m()
.filter(s -> s.mayPickup(Minecraft.getInstanc e().player)).toList()
);
List<Slot> slots = handler.getOpenOrFirstCraftingCo ntainer(recipeType).isPresent()
? filterSlot
: getPlayerInventorySlots(handler) ;
slots.addAll(getCraftingSlots(ha ndler));
return slots;
}
Fix logic:
Scenario | getInputSources() | BoM Highlight | BoM Tree Material
---------------------------+---- -------------------------------- ------------+---------------+--- -----------------
No crafting upgrade | getPlayerInventorySlots() (excludes storage) | Highlighted ✅ | Not sufficient ❌
With crafting upgrade | filterSlot (includes storage) | Not highlighted ✅ | Sufficient ✅
The getPlayerInventorySlots() helper filters out only player inventory slots (index 0–35, container instanceof Inventory) for when no
crafting upgrade is present.
Verification
- Open a Sophisticated Storage without a crafting upgrade, place some recipe materials inside
- Open EMI recipe tree and favorite a recipe
- Close EMI recipe tree and check whether missing materials are highlighted in the storage
- Install a crafting upgrade and repeat — storage items should not be highlighted (BoM considers materials sufficient)
Background
Previously I reported in [#451] that EMI favorites counts were incorrectly including Sophisticated Storage items as player inventory
items (now fixed).
After testing, the original fix introduced a regression: when a Sophisticated Storage does not have a crafting upgrade installed,
materials missing from the recipe tree are not highlighted in the storage, whereas vanilla chests do highlight them correctly.
Thanks to @P3pp3rF1y for promptly fixing this issue.
Latest Fix
In the latest version (1.4.18+), only
getInputSources()inEmiGridMenuInfo.javaneeds to be modified:Fix logic:
The getPlayerInventorySlots() helper filters out only player inventory slots (index 0–35, container instanceof Inventory) for when no
crafting upgrade is present.
Verification