@Override public void setTransient(Registry rg) { super.setTransient(rg); spawnCoolDowns = new HashMap<String, Integer>(); try { for (String key : monsters.keySet()) { Monster monster = (Monster) monsters.get(key); monster.setTransient(rg, this); } } catch (ConcurrentModificationException concEx) { // another thread was trying to modify monsters while iterating // we'll continue and the new item can be grabbed on the next update } }