diff options
author | boubou19 <miisterunknown@gmail.com> | 2024-07-24 00:36:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-24 00:36:54 +0200 |
commit | 8f9411ee3ad160f0b5dcbc0647891f798c18c8de (patch) | |
tree | fe8f7f679ca65c744538c30c9af53582e1c84912 /src/main/java | |
parent | 852196023e2b53ff768fefae2f832ba2b548c85b (diff) | |
download | GT5-Unofficial-8f9411ee3ad160f0b5dcbc0647891f798c18c8de.tar.gz GT5-Unofficial-8f9411ee3ad160f0b5dcbc0647891f798c18c8de.tar.bz2 GT5-Unofficial-8f9411ee3ad160f0b5dcbc0647891f798c18c8de.zip |
fix wrong list class (#2758)
Diffstat (limited to 'src/main/java')
4 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java index 8213aee95e..583da105b5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java @@ -289,7 +289,7 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base { // Adds Recipe GT_RecipeBuilder builder = GT_Values.RA.stdBuilder(); - List<ItemStack> inputs = Arrays.asList(components); + List<ItemStack> inputs = new ArrayList<>(Arrays.asList(components)); inputs.removeIf(Objects::isNull); components = inputs.toArray(new ItemStack[0]); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java index 84e910c9b1..d3088640ef 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -8,6 +8,7 @@ import static gregtech.api.recipe.RecipeMaps.packagerRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; @@ -234,7 +235,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { input = ItemUtils.cleanItemStackArray(input); // Add mixer Recipe - List<ItemStack> inputs = Arrays.asList(input); + List<ItemStack> inputs = new ArrayList<>(Arrays.asList(input)); inputs.removeIf(Objects::isNull); if (oxygen == null) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java index 6b96b558f9..dc7a912cd2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java @@ -4,6 +4,7 @@ import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; @@ -164,8 +165,9 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base { // i don't understand the mess above, so let's just strip nulls and assume the chances are in correct // order - List<ItemStack> internalOutputs = Arrays.asList(mInternalOutputs); + List<ItemStack> internalOutputs = new ArrayList<>(Arrays.asList(mInternalOutputs)); internalOutputs.removeIf(Objects::isNull); + int[] chances = new int[internalOutputs.size()]; for (int i = 0; i < internalOutputs.size(); i++) { chances[i] = mChances[i]; @@ -280,7 +282,7 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base { } // i don't understand the mess above, so let's just strip nulls and assume the chances are in correct // order - List<ItemStack> internalOutputs = Arrays.asList(mInternalOutputs); + List<ItemStack> internalOutputs = new ArrayList<>(Arrays.asList(mInternalOutputs)); internalOutputs.removeIf(Objects::isNull); int[] chances = new int[internalOutputs.size()]; for (int i = 0; i < internalOutputs.size(); i++) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java index eb55f2989c..07a5a82ef6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java @@ -492,7 +492,7 @@ public class RecipeGen_Ore extends RecipeGen_Base { // i don't understand the mess above, so let's just strip nulls and assume the chances are in correct // order - List<ItemStack> internalOutputs = Arrays.asList(mInternalOutputs); + List<ItemStack> internalOutputs = new ArrayList<>(Arrays.asList(mInternalOutputs)); internalOutputs.removeIf(Objects::isNull); int[] chances = new int[internalOutputs.size()]; for (int i = 0; i < internalOutputs.size(); i++) { @@ -608,7 +608,7 @@ public class RecipeGen_Ore extends RecipeGen_Base { // i don't understand the mess above, so let's just strip nulls and assume the chances are in correct // order - List<ItemStack> internalOutputs = Arrays.asList(mInternalOutputs); + List<ItemStack> internalOutputs = new ArrayList<>(Arrays.asList(mInternalOutputs)); internalOutputs.removeIf(Objects::isNull); int[] chances = new int[internalOutputs.size()]; for (int i = 0; i < internalOutputs.size(); i++) { |