HomeJavaModsDeltatime
Deltatime

Minecraft mod making datapacks able to take control of some vanilla features

Features

this mod adds commands to the game, which uncover some features to datapacks the root command is /deltatime

How to use /deltatime tickstoadd

example:

execute store result score tickstoadd objective run deltatime tickstoadd
scoreboard players operation untilactionprevious objective = untilaction objective
scoreboard players operation untilaction objective -= tickstoadd objective
execute if score untilaction objective matches ..0 unless score untilactionp objective matches ..0 run function my:action

In this example, we are trying to run "function my:action" after "untilaction objective" ticks run. If we want to make it independant of server performance, we need to add a larger number of ticks to the counter, if the server lags. This means that there is a possibility that the counter jumps over the 0. In order to prevent the action from not executing, we need to have another variable, which tells us the tickcount before the tickstoadd get added (subtracted). Then we need to check if the previous count is higher than 0 and the current count is exactly or less than 0.

(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)

Player abilities

(note that these values change after reconnect or changing gamemodes (except those that don't))

Player properties

Additional notes

Please make an issue report if you find any undocumented unusual behaviour when changing the values, so I can document them.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

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

Explore more