This commit is contained in:
Bram Verhulst
2024-07-04 14:42:38 +02:00
commit 67af73c6b5
60 changed files with 13407 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { system } from "@minecraft/server";
function delayedRun(callback: Function, delay: number) {
let timer = system.runTimeout(() => {
callback();
system.clearRun(timer);
}, delay);
}
function delay(t: number) {
return new Promise((r: any) => {
system.runTimeout(r, t);
});
}
export { delayedRun, delay };