22 lines
395 B
Java
22 lines
395 B
Java
package net.minecraft.server;
|
|
|
|
public class TickTask implements Runnable {
|
|
private final int tick;
|
|
private final Runnable runnable;
|
|
|
|
public TickTask(int tick, Runnable runnable) {
|
|
this.tick = tick;
|
|
this.runnable = runnable;
|
|
}
|
|
|
|
/**
|
|
* Get the server time when this task was scheduled
|
|
*/
|
|
public int getTick() {
|
|
return this.tick;
|
|
}
|
|
|
|
public void run() {
|
|
this.runnable.run();
|
|
}
|
|
}
|