Nucleosynthesizer shows confusing/wrong antimatter cost
Paspartout opened this issue ยท 4 comments
Issue description:
The JEI Recepie view of the Nucleosynthesizer shows 200mB for each recepie which is way too much and confusing in my opinion. Looking at the code it seems like it somehow displays the mB/t but I think it should show the amount of mB needed for one operation.
Steps to reproduce:
- Load up any game/save using Mekanism 10 and JEI
- Press U or right click on antimatter gas in JEI to see usages
- Hover over the gas tank in the Nucleosynthesizer, it shows 200mB antimatter usage for all recepies.
Version (make sure you are on the latest version before reporting):
Forge: 35.0.18
Mekanism: 10.0.17 (latest version from 1.16.3 branch)
Aha! Looking at it, it is because the JEI code is copy pasted and assumes a per tick usage but the nucleosynthesizer actually passes to the recipe that it has a zero per tick usage, should be trivial to fix for 10.0.18.
I am trying to get into the mekanism codebase myself at the moment, so I might try to fix it myself.
Would making the NucleosynthesizingRecipe similar to the MetallurgicInfuserRecipe be a good fix for this?
I think in theory removing the following lines:
https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/jei/machine/NucleosynthesizingRecipeCategory.java#L111-L112
https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/jei/machine/NucleosynthesizingRecipeCategory.java#L115-L116
And changing https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/jei/machine/NucleosynthesizingRecipeCategory.java#L120 from scaledGases
to gasInputs
probably would be enough to fix it, as well as changing:
https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/jei/machine/NucleosynthesizingRecipeCategory.java#L93-L96 to be ingredients.setInputLists(MekanismJEI.TYPE_GAS, Collections.singletonList(recipe.getChemicalInput().getRepresentations()));