Skip to content

Commit

Permalink
Rename "await for" to "await delay"
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Dec 28, 2023
1 parent 59ca357 commit 9f10895
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/github/misode/packtest/PackTestFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public static PackTestFunction fromLines(ResourceLocation id, CommandDispatcher<
steps.add(new ExecuteStep(currentLines, dispatcher));
currentLines = Lists.newArrayList();
}
if (sLine.startsWith("await for ")) {
steps.add(new IdleStep(line.substring("await for ".length())));
if (sLine.startsWith("await delay ")) {
steps.add(new IdleStep(line.substring("await delay ".length())));
} else {
steps.add(new AwaitStep(line, dispatcher));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void register(CommandDispatcher<CommandSourceStack> dispatcher, Co

public static void addConditions(LiteralArgumentBuilder<CommandSourceStack> builder, CommandBuildContext buildContext, Function<AssertCommand.AssertPredicate, Command<CommandSourceStack>> expect) {
AssertCommand.addConditions(builder, buildContext, expect);
builder.then(literal("for")
builder.then(literal("delay")
.then(argument("time", TimeArgument.time())
.executes(expect.apply(ctx -> AssertCommand.err("Timed out")))));
}
Expand Down

0 comments on commit 9f10895

Please sign in to comment.