diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java index 7379cf08a..e0570e40f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java @@ -51,8 +51,11 @@ public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) { stack = new ItemStack(Blocks.fire); tooltips.add(String.format("no entries found for oredict \"%s\"", component.getOreDictName())); } - tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(component.getChance() / totalMeteorWeight))); + float chance = component.getChance() / totalMeteorWeight; + tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance))); + tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius))); this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips)); + col++; if (col > 8) { col = 0; @@ -197,7 +200,11 @@ private List getSortedMeteors() { .collect(Collectors.toList()); } - private String getFormattedChance(double chance) { + private String getFormattedChance(float chance) { return new DecimalFormat("0.##").format(chance * 100); } + + private int getEstimatedAmount(float chance, int radius) { + return (int) Math.ceil(3f / 4 * Math.PI * Math.pow(radius, 3) * chance); + } } diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index 47bbf0ddf..03d59f93f 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -265,6 +265,7 @@ nei.recipe.meteor.category=Meteor Ritual nei.recipe.meteor.cost=Cost: %s LP nei.recipe.meteor.radius=Radius: %s nei.recipe.meteor.chance=Chance: %s%% +nei.recipe.meteor.amount=Estimated amount: %s #Rituals ritual.AW001Water.name=Ritual of the Full Spring