public class SimpleTickScheduler<T> extends Object implements TickScheduler<T>
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SimpleTickScheduler.Tick<T> |
| Modifier and Type | Field and Description |
|---|---|
private Function<T,Identifier> |
identifierProvider |
private List<SimpleTickScheduler.Tick<T>> |
scheduledTicks |
| Modifier | Constructor and Description |
|---|---|
|
SimpleTickScheduler(Function<T,Identifier> identifierProvider,
List<ScheduledTick<T>> scheduledTicks,
long startTime) |
private |
SimpleTickScheduler(Function<T,Identifier> identifierProvider,
List<SimpleTickScheduler.Tick<T>> scheduledTicks) |
| Modifier and Type | Method and Description |
|---|---|
static <T> SimpleTickScheduler<T> |
fromNbt(ListTag ticks,
Function<T,Identifier> function,
Function<Identifier,T> function2) |
boolean |
isScheduled(BlockPos pos,
T object) |
boolean |
isTicking(BlockPos pos,
T object) |
void |
schedule(BlockPos pos,
T object,
int delay,
TickPriority priority) |
void |
scheduleTo(TickScheduler<T> scheduler) |
ListTag |
toNbt() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscheduleprivate final List<SimpleTickScheduler.Tick<T>> scheduledTicks
private final Function<T,Identifier> identifierProvider
public SimpleTickScheduler(Function<T,Identifier> identifierProvider, List<ScheduledTick<T>> scheduledTicks, long startTime)
private SimpleTickScheduler(Function<T,Identifier> identifierProvider, List<SimpleTickScheduler.Tick<T>> scheduledTicks)
public boolean isScheduled(BlockPos pos, T object)
isScheduled in interface TickScheduler<T>public void schedule(BlockPos pos, T object, int delay, TickPriority priority)
schedule in interface TickScheduler<T>public boolean isTicking(BlockPos pos, T object)
isTicking in interface TickScheduler<T>public ListTag toNbt()
public static <T> SimpleTickScheduler<T> fromNbt(ListTag ticks, Function<T,Identifier> function, Function<Identifier,T> function2)
public void scheduleTo(TickScheduler<T> scheduler)