Using getTotalMeteorWeight function

Changed copy-pasted weight calculation code to function call for getTotalMeteorWeight
This commit is contained in:
Bigfluf authored and GitHub committed 2022-04-08 12:03:48 +02:00
1 parent 00f9fa1add
commit 1593b5482b
1 file changed
+1 -8
@@ -37,14 +37,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
int row = 0;
int col = 0;
float totalMeteorWeight = 0.0f;
for (MeteorParadigmComponent component : meteor.componentList) {
ItemStack stack = component.getValidBlockParadigm();
if (stack == null) {
continue;
}
totalMeteorWeight += component.getChance();
}
float totalMeteorWeight = meteor.getTotalMeteorWeight();
for (MeteorParadigmComponent component : meteor.componentList) {
ItemStack stack = component.getValidBlockParadigm();