From 1593b5482bd0579b2f3d5d86f86a8ff62c7350f7 Mon Sep 17 00:00:00 2001 From: Bigfluf <34474265+Bigfluf@users.noreply.github.com> Date: Fri, 8 Apr 2022 12:03:48 +0200 Subject: [PATCH] Using getTotalMeteorWeight function Changed copy-pasted weight calculation code to function call for getTotalMeteorWeight --- .../client/nei/NEIMeteorRecipeHandler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java index acaeacd8..137ede95 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/nei/NEIMeteorRecipeHandler.java @@ -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();