even more default capacities
This commit is contained in:
@@ -11,8 +11,8 @@ import java.util.Map;
|
||||
public abstract class Script {
|
||||
|
||||
public ScriptAPI scriptAPI;
|
||||
public ArrayList<Item> inventory = new ArrayList<>();
|
||||
public ArrayList<Item> equipment = new ArrayList<>();
|
||||
public ArrayList<Item> inventory = new ArrayList<>(20);
|
||||
public ArrayList<Item> equipment = new ArrayList<>(20);
|
||||
public Map<Integer, Integer> skills = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class PvMBots extends AIPlayer {
|
||||
|
||||
|
||||
public List<Entity> FindTargets(Entity entity, int radius) {
|
||||
List<Entity> targets = new ArrayList<>();
|
||||
List<Entity> targets = new ArrayList<>(20);
|
||||
Object[] localNPCs = RegionManager.getLocalNpcs(entity,radius).toArray();
|
||||
int length = localNPCs.length;
|
||||
if(length > 5){length = 5;}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class WildernessBot extends AIPlayer {
|
||||
|
||||
|
||||
public List<Entity> FindTargets(Entity entity, int radius) {
|
||||
List<Entity> targets = new ArrayList<>();
|
||||
List<Entity> targets = new ArrayList<>(20);
|
||||
for (Player player : RegionManager.getLocalPlayers(entity, radius)) { {
|
||||
if (checkValidTargets(player))
|
||||
targets.add(player);
|
||||
|
||||
Reference in New Issue
Block a user