schedule() doesn't work correctly during a tick sprint
Yadokingu opened this issue ยท 2 comments
Since the delay in schedule() is tick-based I would expect it to behave the same in a tick sprint as it does while the game runs at normal speed. It does not.
I made a small script that switches to hotbar slot 7 when the player picks up an item, then uses that item (throws the splash potion) and then switches quickly to slot 8 (looting sword). At normal game speed that works perfectly fine, during a sprint the potion isn't thrown.
My code probably isn't great, but it's the best I could come up with after reading the documentation and I don't think it's the cause of the problem:
__on_player_picks_up_item(player, item) -> (
modify(player(), 'selected_slot', 7);
schedule(2, splashfarm1() -> run(str('player %s %s', player(), 'use once')));
schedule(3, splashfarm2() -> modify(player(), 'selected_slot', 8));
);
Carpet 1.4.128+v231205
Minecraft 1.20.4
I'd suspect this to not be related to schedule
itself, but to running /player
there.