Skip to content

Commit

Permalink
I have an IDEA, maybe don't refactor that?
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarWitch7 committed Jul 30, 2024
1 parent bb3c676 commit 8495e9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public void updateSpell(SpellPart spell) {
});
}
} else {
// var type = SpellPart.CODEC.encodeStart(JsonOps.INSTANCE, spell).type().get();
// Trickster.LOGGER.warn(type.toString());
// var result = SpellPart.CODEC.encodeStart(JsonOps.INSTANCE, spell).result().get();
// Trickster.LOGGER.warn(result.toString());
sendMessage(new SpellMessage(spell));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected void flattenNode(SpellPart head) {
}

/**
* @return the spell's type, or Optional.empty() if the spell is not done executing.
* @return the spell's result, or Optional.empty() if the spell is not done executing.
* @throws BlunderException
*/
@Override
Expand All @@ -102,7 +102,7 @@ public Optional<Fragment> run(SpellSource source, int executions) throws Blunder
}

/**
* @return the spell's type, or Optional.empty() if the spell is not done executing.
* @return the spell's result, or Optional.empty() if the spell is not done executing.
* @throws BlunderException
*/
protected Optional<Fragment> run(SpellContext ctx, int executions) throws BlunderException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface SpellExecutor {
* <p>
* Before this function throws, it will append the additional spell stacktrace to the stacktrace in the provided context.
*
* @return the spell's type.
* @return the spell's result.
* @throws BlunderException
*/
default Fragment singleTickRun(SpellContext context) throws BlunderException {
Expand All @@ -38,23 +38,23 @@ default Fragment singleTickRun(SpellContext context) throws BlunderException {
/**
* Attempts to execute the spell within a single tick, throws ExecutionLimitReachedBlunder if single-tick execution is not feasible.
*
* @return the spell's type.
* @return the spell's result.
* @throws BlunderException
*/
default Fragment singleTickRun(SpellSource source) throws BlunderException {
return run(source).orElseThrow(ExecutionLimitReachedBlunder::new);
}

/**
* @return the spell's type, or Optional.empty() if the spell is not done executing.
* @return the spell's result, or Optional.empty() if the spell is not done executing.
* @throws BlunderException
*/
default Optional<Fragment> run(SpellSource source) throws BlunderException {
return run(source, 0);
}

/**
* @return the spell's type, or Optional.empty() if the spell is not done executing.
* @return the spell's result, or Optional.empty() if the spell is not done executing.
* @throws BlunderException
*/
Optional<Fragment> run(SpellSource source, int executions) throws BlunderException;
Expand Down

0 comments on commit 8495e9f

Please sign in to comment.