Skip to content

Commit 295dd5b

Browse files
committed
- Fix an incorrect chance tip.
1 parent 3252c0d commit 295dd5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/hellfirepvp/modularmachinery/common/crafting/requirement/jei/JEIComponentIngredientArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void onJEIHoverTooltip(int slotIndex, boolean input, IngredientItemStack
9898
tooltipBuilder.append(" * ").append(stack.count);
9999
}
100100

101-
float chance = actionType == IOType.OUTPUT ? stack.chance * requirement.chance : stack.chance / totalChance;
101+
float chance = actionType == IOType.INPUT ? (stack.chance * requirement.chance) : (totalChance == 0 ? 0 : stack.chance / totalChance);
102102
if (chance < 1F && chance >= 0F) {
103103
tooltipBuilder.append(" (");
104104

0 commit comments

Comments
 (0)