Package net.minecraft.world.level.timers
Class TimerQueue<T>
java.lang.Object
net.minecraft.world.level.timers.TimerQueue<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final TimerCallbacks<T> private final com.google.common.collect.Table<String, Long, TimerQueue.Event<T>> private static final org.slf4j.Loggerprivate final Queue<TimerQueue.Event<T>> private com.google.common.primitives.UnsignedLongprivate static final Stringprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionTimerQueue(TimerCallbacks<T> callbacksRegistry) TimerQueue(TimerCallbacks<T> callbacksRegistry, Stream<? extends com.mojang.serialization.Dynamic<?>> scheduledEventsDynamic) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> Comparator<TimerQueue.Event<T>> private voidloadEvent(CompoundTag tag) intvoidschedule(String id, long triggerTime, TimerCallback<T> callback) store()private CompoundTagstoreEvent(TimerQueue.Event<T> event) void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CALLBACK_DATA_TAG
- See Also:
-
TIMER_NAME_TAG
- See Also:
-
TIMER_TRIGGER_TIME_TAG
- See Also:
-
callbacksRegistry
-
queue
-
sequentialId
private com.google.common.primitives.UnsignedLong sequentialId -
events
-
-
Constructor Details
-
TimerQueue
public TimerQueue(TimerCallbacks<T> callbacksRegistry, Stream<? extends com.mojang.serialization.Dynamic<?>> scheduledEventsDynamic) -
TimerQueue
-
-
Method Details
-
createComparator
-
tick
-
schedule
-
remove
-
getEventsIds
-
loadEvent
-
storeEvent
-
store
-