Home›Java›Datapacks›Deltatime
Deltatime
DatapacksJava

Deltatime

Java data pack listed for Minecraft 1.21. Downloads from the MC Java Mods app on Android.

by SmajloSlovakian · on Modrinth

⬇ Download on Modrinth

WARNING!

Scoreboard values

Scoreboard objective: deltatime

How to use tickstoadd

example:

scoreboard players operation untilactionprev objective = untilaction objective
scoreboard players operation untilaction objective -= tickstoadd deltatime
execute if score untilaction objective matches ..20 unless score untilactionprev objective matches ..20 run function my:action1
execute if score untilaction objective matches ..0 unless score untilactionprev objective matches ..0 run function my:action2

If you just want to time one action, you can just check for ..0 without the helper variable

(note that if you set the counter to a lower/higher (according to the direction of counting) value while the counter is counting and you won't also change the previous count, it will execute everything in between the previous and current value)

How does the datapack work?

Also check out the mod version for even better accuracy! (although even less maintained)

Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more