fix: wrong chance in jei when chance < 0.01

This commit is contained in:
swwind 2022-08-18 20:08:46 +08:00 committed by GitHub
parent 65073e84bd
commit 49ccae2db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
if (!singleOutput && mouseX >= minX && mouseX < maxX && mouseY >= minY && mouseY < maxY) {
float chance = recipe.getOutputChance();
tooltip.add(junk);
tooltip.add(Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : 100 - (int) (chance * 100))
tooltip.add(Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? ">99" : 100 - (int) (chance * 100))
.withStyle(ChatFormatting.GOLD));
return tooltip;
}