mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
#207 Fixed '0% Chance' tool tip in NEI.
This commit is contained in:
1 parent
637db25c4c
commit
0d075c158d
1 file changed
+6
-2
@@ -87,11 +87,15 @@ public class SagMillRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public List<String> handleItemTooltip(GuiRecipe gui, ItemStack stack, List<String> currenttip, int recipeIndex) {
|
||||
// TODO Auto-generated method stub
|
||||
MillRecipe recipe = (MillRecipe) arecipes.get(recipeIndex);
|
||||
float chance = recipe.getChanceForOutput(stack);
|
||||
if(chance > 0 && chance < 1) {
|
||||
currenttip.add((int) (chance * 100) + "% Chance");
|
||||
int chanceInt = (int) (chance * 100);
|
||||
if(chanceInt == 0) {
|
||||
currenttip.add("Less than 1%");
|
||||
} else {
|
||||
currenttip.add(chanceInt + "% Chance");
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user