Chernobyl 0 Posted August 12, 2017 Hello, I need your help guys. I want to get all trees in a specific area.... List<GameObject> trees = getGameObjects().all(t -> woodArea.contains(t) && t != null && t.getName().equals("Tree")); Without the area condition it works, if not I get ConcurrentModdificationException Can you explain me what I did wrong please? [ERROR]17:32:51: Exception has occurred while running! Please report error to developer if problem persists: java.util.ConcurrentModificationException at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1380) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.dreambot.api.methods.interactive.GameObjects.all(GameObjects.java:72) at org.dreambot.api.methods.interactive.Interactables.all(Interactables.java:59) at TreeChopper.getTarget(TreeChopper.java:100) at TreeChopper.onLoop(TreeChopper.java:555) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:251) at java.lang.Thread.run(Thread.java:748) Tank you.
Chernobyl 0 Author Posted August 12, 2017 Put the null check first in your filter and try again. I get the same error again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.