Home›Java›Mods›TickTime
TickTime
ModsJava

TickTime

Java mod listed for Minecraft 1.14–1.15. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Did you know that measuring time in seconds could lead to unfair disadvantages?
How can we prevent these situations? With TickTime. This lightweight, sigle-class API is a must have in any plugin that measures time in any way. While using System.nanotime() is normally the way to go, measuring the time like that in Minecraft can lead to some inconsistencies due to lag, plugins, players, entities, armor stands , etc, etc. With TickTime, you can measure the time in Minecraft ticks, so measurements will be consistent with worlds, entities, players, etc.

Every time Minecraft thinks time has passed, TickTime will too.
​
TickTime has no commands, no permissions and no events, so just drag-and-drop into your plugins folder. Because TickTime only uses two imports (that every spigot.jar has) it is essentially version-independent.

Do you want to use TickTime too? Drag-and-drop into your project and use it like this:

Code (Java):
long time0 = TickTime. currentTickTime ( ) ;

letsMakeSomeCode ( ) ;

long time1 = TickTime. currentTickTime ( ) ;

// calculate time between ticks!
long time_taken = time1 - time0 ;

// 1 second = 20 mc ticks
long seconds = time_taken / 20 ;
I don't even need to put the code in GitHub. (The author would like to tell you that he doesn't even know how to use GitHub, that noob)
Spoiler
Code (Java):
package dev.ckitty.mc.ticktime ;

import org.bukkit.plugin.java.JavaPlugin ;
import org.bukkit.scheduler.BukkitRunnable ;

public class TickTime extends JavaPlugin {
 
    private static long TICK_TIME ;
 
    public static long currentTickTime ( ) {
        return TICK_TIME ;
    }
 
    private Timer timer ;

    @Override
    public void onEnable ( ) {
        timer = new Timer ( ) ;
        timer. runTaskTimerAsynchronously ( this , 0 , 1 ) ;
    }
 
    @Override
    public void onDisable ( ) {
        timer. cancel ( ) ;
        timer = null ;
    }
 
    private class Timer extends BukkitRunnable {

        @Override
        public void run ( ) {
            TICK_TIME ++;
        }
   
    }
 
}
 

General Information:

Plugin details

Read from the plugin's own plugin.yml.

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.

TickTime is a free Minecraft Java mod. Compatible with Minecraft 1.14, 1.15. Downloaded 310 times (via Spigot). Download it and open it directly in the game.

Explore more