Community listing page, reviews here may not be monitored by the author.
Deltatime
No reviews yet
Keep track of the real time even on laggy servers (uses the worldborder method)
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
WARNING!
- this pack was designed to be used with Multi world border mod
- if you don't use this mod, you need to adjust the minimal diameter of the worldborder in the datapack (decreasing accuracy) to avoid getting unexpected worldborder damage
Scoreboard values
Scoreboard objective: deltatime
- tickdelta -> previous tick duration (defaultly in milliseconds) (maxes out at 10 seconds by default)
- tickstoadd -> number to add to a counter, which you don't want to be affected by lags (more info below on how to use it effectively)
- accuracy <- the accuracy of the timings (defaults to 1000 -> milliseconds)
- for even more accuracy, you need to edit this datapack's worldborder's minimal values
- for even even more accuracy, you need to use my mod with the same name
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
- In this example, we are trying to run "function my:action2" after "untilaction objective" ticks run and a "function my:action1" 1 second before it.
- 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 20 or 0.
- In order to prevent the actions 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 our desired value and the current count is exactly or less than our desired value.
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?
- worldborder in minecraft does not time itself based on ticks but on real seconds
- this makes it possible to calculate the time by changing the border's size with a set duration
- the next tick just get the border's size and calculate how much time passed based on how much has the border changed
Also check out the mod version for even better accuracy! (although even less maintained)
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers