public class ChunkTickScheduler<T> extends Object implements TickScheduler<T>
Modifier and Type | Field and Description |
---|---|
private ChunkPos |
pos |
private it.unimi.dsi.fastutil.shorts.ShortList[] |
scheduledPositions |
protected Predicate<T> |
shouldExclude |
Constructor and Description |
---|
ChunkTickScheduler(Predicate<T> shouldExclude,
ChunkPos pos) |
ChunkTickScheduler(Predicate<T> shouldExclude,
ChunkPos pos,
ListTag tag) |
Modifier and Type | Method and Description |
---|---|
boolean |
isScheduled(BlockPos pos,
T object) |
boolean |
isTicking(BlockPos pos,
T object) |
void |
schedule(BlockPos pos,
T object,
int delay,
TickPriority priority) |
void |
tick(TickScheduler<T> scheduler,
Function<BlockPos,T> dataMapper) |
ListTag |
toNbt() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
schedule
private final ChunkPos pos
private final it.unimi.dsi.fastutil.shorts.ShortList[] scheduledPositions
public ListTag toNbt()
public void tick(TickScheduler<T> scheduler, Function<BlockPos,T> dataMapper)
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>