Add stopwatch command and execute if stopwatch

Adds the stopwatches store saved in data/minecraft/stopwatches.dat, the /stopwatch create, query, restart and remove commands, and the execute if stopwatch condition, with the parse tree and parse fixture updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-10 06:20:08 +02:00
parent 5a5bdf6a9b
commit abb21704dd
10 changed files with 234 additions and 0 deletions
@@ -180,6 +180,11 @@ fn conditionals(d: &mut Dispatcher, m: usize, ex: usize) {
let p = d.argument(predicate, "predicate", ArgType::Id("predicates"));
conditional(d, p, ex);
let stopwatch = d.literal(m, "stopwatch");
let id = d.argument(stopwatch, "id", ArgType::Id("stopwatches"));
let range = d.argument(id, "range", ArgType::FloatRange);
conditional(d, range, ex);
let function = d.literal(m, "function");
let name = d.argument(function, "name", ArgType::Function);
conditional(d, name, ex);