long stateTime = (state != null) ? state.time() : 0;
nextReactions.put(stateTime + reactionEntry.getValue().updateInterval(), Pair.of(reactionEntry.getKey(), reactionEntry.getValue()));
}
reactionName = nextReactions.get(nextReactions.firstKey()).getLeft();
nextReaction = nextReactions.get(nextReactions.firstKey()).getRight();
}
long stateTime = (state != null) ? state.time() : 0;
nextReactions.put(stateTime + reactionEntry.getValue().updateInterval(), Pair.of(reactionEntry.getKey(), reactionEntry.getValue()));
}
reactionName = nextReactions.get(nextReactions.firstKey()).getLeft();
nextReaction = nextReactions.get(nextReactions.firstKey()).getRight();
}