even more default capacities
This commit is contained in:
@@ -9,9 +9,9 @@ import java.util.List;
|
||||
|
||||
public class DropPlugins {
|
||||
public static HashMap<Integer,List<DropPlugin>> plugins = new HashMap<>();
|
||||
public static List<DropPlugin> globalPlugins = new ArrayList<>();
|
||||
public static List<DropPlugin> globalPlugins = new ArrayList<>(20);
|
||||
public static List<Item> getDrops(int npc_id){
|
||||
List<Item> drops = new ArrayList<>();
|
||||
List<Item> drops = new ArrayList<>(20);
|
||||
List<DropPlugin> toHandle = plugins.get(npc_id);
|
||||
if(toHandle != null) {
|
||||
for (DropPlugin plugin : toHandle) {
|
||||
@@ -30,7 +30,7 @@ public class DropPlugins {
|
||||
if(plugin.accepted_npcs.length > 0) {
|
||||
Arrays.stream(plugin.accepted_npcs).forEach(id -> {
|
||||
if (plugins.get(id) == null) {
|
||||
List<DropPlugin> newlist = new ArrayList<>();
|
||||
List<DropPlugin> newlist = new ArrayList<>(20);
|
||||
plugins.putIfAbsent(id, newlist);
|
||||
}
|
||||
plugins.get(id).add(plugin);
|
||||
|
||||
@@ -18,7 +18,7 @@ public class MysteryBoxDropper extends DropPlugin {
|
||||
|
||||
//percentage chance of it dropping, between 1 and 100.
|
||||
private int chance = 15;
|
||||
List<Item> drops = new ArrayList<>(); //the list of dropped items
|
||||
List<Item> drops = new ArrayList<>(20); //the list of dropped items
|
||||
|
||||
//standard way to initialize a drop plugin
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user