/* convert states. */
for (Filter filter : nextReaction.filters()) {
- net.pterodactylus.reactor.State newState = filter.filter(state);
- logger.debug(String.format("Old state is %s, new state is %s.", state, newState));
- state = newState;
+ if (state.success()) {
+ net.pterodactylus.reactor.State newState = filter.filter(state);
+ logger.debug(String.format("Old state is %s, new state is %s.", state, newState));
+ state = newState;
+ }
+ }
+ if (state.success()) {
+ reactionExecution.addState(state);
}
- reactionExecution.addState(state);
/* only run trigger if we have collected two states. */
Trigger trigger = nextReaction.trigger();