Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ConcurrentModificationException, while spawning zombie #584
Glowstone build(compiled locally): 2017.10.0-SNAPSHOT.6ecd65a (MC: 1.12.2)
Steps to reproduce:
EDIT: Would someone please edit the title to "ConcurrentModificationException caused by zombie movements" or something similiar?
Normal concurrent lists/sets don't support concurrent iterating in most cases.
So here we have to implement own synchronisation(e.g. synchronized-blocks or ReadWriteLock).
Alternative way(using Collections.synchronizedList()); Use .iterator() and call hasNext() and next() in a while loop