emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 46 forks source link

GregTech machines not recognized as catalysts #478

Closed steph-lion closed 21 hours ago

steph-lion commented 3 months ago

When using tree, and using a recipe which uses a GT machine, its model does not appear in the tree.

image

By hovering it you can see the name but not the icon/model of the machine image

emilyploszaj commented 3 months ago

From my understanding this is simply the gregtech machines being rendered inconsistently with vanilla items and something they would need to fix, I believe they have a bug open.

embeddedt commented 1 month ago

This appears to be an EMI bug that occurs if the batching renderer is disabled. Rendering of the GT machine is triggered by

https://github.com/emilyploszaj/emi/blob/44b478054a05f96dc935672566653596e49d1678/xplat/src/main/java/dev/emi/emi/screen/BoMScreen.java#L714

as it is the category for the recipe. The overload of StackBatcher.render which is called here (the one accepting a Batchable) does not appear to fall back and render the Batchable manually if batching is disabled, unlike the one accepting an EmiIngredient. This causes the machine to simply never be rendered.

emilyploszaj commented 1 month ago

This is a correct diagnosis, weird, thanks.

embeddedt commented 1 day ago

This is probably fixed in the latest release since the code now checks for StackBatcher being enabled.

https://github.com/emilyploszaj/emi/blob/e06ba48d14d51aa1e221df3e3be75aec09fcf89c/xplat/src/main/java/dev/emi/emi/screen/BoMScreen.java#L713