even more default capacities

This commit is contained in:
Ceikry
2021-03-12 21:23:46 -06:00
parent 78a9b8c88e
commit 19e20d9dc9
109 changed files with 144 additions and 144 deletions
@@ -152,7 +152,7 @@ public class RandomFunction {
}
final int random = random((int) total);
double subTotal = 0;
List<ChanceItem> choices = new ArrayList<>();
List<ChanceItem> choices = new ArrayList<>(20);
for (ChanceItem item : items) {
choices.add(item);
}
@@ -167,8 +167,8 @@ public class RandomFunction {
}
public static List<Item> rollChanceTable(boolean atLeastOne,List<ChanceItem> table){
final List<Item> rewards = new ArrayList<>();
final List<Item> always_rewards = new ArrayList<>();
final List<Item> rewards = new ArrayList<>(20);
final List<Item> always_rewards = new ArrayList<>(20);
final List<ChanceItem> chanceTable = new ArrayList<ChanceItem>(table);
boolean isAllAlways = false;
if(table.stream().filter(item -> item.getChanceRate() == 1).count() == table.size()){