quick fix : Bulk operation can be used instead of iteration

This commit is contained in:
Alexdoru committed 2023-01-25 21:54:44 +01:00
1 parent 8b976cf054
commit bf6097d920
2 files changed
+2 -6

No files matched your search

@@ -17,9 +17,7 @@ public abstract class ItemModifier {
* @param dataKey NBT string to put on the item
*/
public ItemModifier(ItemStack[] recipe, int effect, String dataKey) {
List<ItemStack> itemstacks = new ArrayList<ItemStack>();
for (int iter = 0; iter < recipe.length; iter++) itemstacks.add(recipe[iter]);
stacks = itemstacks;
stacks = new ArrayList<>(Arrays.asList(recipe));
effectIndex = effect;
key = dataKey;
}