fluid recipes have wrong quantities when transfered from JEI
jonatjano opened this issue ยท 2 comments
Describe the Bug
When transfering a create recipe from JEI to a machine, the liquid quantity is off.
This is due to that method from com.simibubi.create.compat.jei.category.CreateRecipeCategory
public static FluidStack withImprovedVisibility(FluidStack stack) {
FluidStack display = stack.copy();
int displayedAmount = (int) (stack.getAmount() * .75f) + 250;
display.setAmount(displayedAmount);
return display;
}
The goal of the method is to make small liquid quantities more visible in JEI
Reproduction Steps
- create an instance with Create, JEI and Refined Storage
- place a refined storage pattern grid with a controller
- open JEI in a mixing recipe with liquids, for example Builder's tea
- click the + at the bottom right of the recipe to tranfert it to the pattern grid
- see that the liquid amounts are off in the pattern grid
Expected Result
The liquid amount should be the same in the pattern grid than in JEI
Screenshots and Videos
(The water is not visibly affected because 1000*0.75+250 = 1000
)
Crash Report or Log
No response
Operating System
Linux (bug is system independant)
Mod Version
0.5.1f
Minecraft Version
1.20.1
Forge Version
neoforge 47.1.104
Other Mods
No response
Additional Context
That function was implemented 4 years back in this commit which means that a lot of create versions are impacted
There are 2 solutions that I see :
- remove the improvedVisibility and let JEI manage it's own visibility
- see if JEI allows to change edit the value again when the player click on the button to set it back to the true value either by having it stored somewhere or using
(x-250)*4/3
which could reduce the precision of the value