Package net.minecraft.world.timer
Class Timer<T>
java.lang.Object
net.minecraft.world.timer.Timer<T>
public class Timer<T> extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Timer.Event<T>
-
Field Summary
Fields Modifier and Type Field Description private TimerCallbackSerializer<T>
callback
private UnsignedLong
eventCounter
private Queue<Timer.Event<T>>
events
private Table<String,Long,Timer.Event<T>>
eventsByName
private static Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description Timer(TimerCallbackSerializer<T> timerCallbackSerializer)
Timer(TimerCallbackSerializer<T> timerCallbackSerializer, Stream<com.mojang.serialization.Dynamic<Tag>> stream)
-
Method Summary
Modifier and Type Method Description private void
addEvent(CompoundTag tag)
private static <T> Comparator<Timer.Event<T>>
createEventComparator()
Set<String>
method_22592()
int
method_22593(String string)
void
processEvents(T server, long time)
private CompoundTag
serialize(Timer.Event<T> event)
void
setEvent(String name, long triggerTime, TimerCallback<T> callback)
ListTag
toTag()
-
Field Details
-
LOGGER
-
callback
-
events
-
eventCounter
-
eventsByName
-
-
Constructor Details
-
Timer
public Timer(TimerCallbackSerializer<T> timerCallbackSerializer, Stream<com.mojang.serialization.Dynamic<Tag>> stream) -
Timer
-
-
Method Details
-
createEventComparator
-
processEvents
-
setEvent
-
method_22593
-
method_22592
-
addEvent
-
serialize
-
toTag
-