Modifier and Type | Field and Description |
---|---|
private java.util.function.Function<ResourceLocation,T> |
deserializer |
private java.util.List<NextTickListEntry<T>> |
entriesRunThisTick |
protected java.util.function.Predicate<T> |
filter |
private java.util.Set<NextTickListEntry<T>> |
pendingTickListEntriesHashSet |
private java.util.Queue<NextTickListEntry<T>> |
pendingTickListEntriesThisTick |
private java.util.TreeSet<NextTickListEntry<T>> |
pendingTickListEntriesTreeSet |
private java.util.function.Function<T,ResourceLocation> |
serializer |
private java.util.function.Consumer<NextTickListEntry<T>> |
tickFunction |
private ServerWorld |
world |
Constructor and Description |
---|
ServerTickList(ServerWorld worldIn,
java.util.function.Predicate<T> filter,
java.util.function.Function<T,ResourceLocation> serializerIn,
java.util.function.Function<ResourceLocation,T> deserializerIn,
java.util.function.Consumer<NextTickListEntry<T>> tickFunctionIn) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(java.util.stream.Stream<NextTickListEntry<T>> p_219497_1_) |
private void |
addEntry(NextTickListEntry<T> p_219504_1_) |
void |
copyTicks(MutableBoundingBox area,
BlockPos offset) |
static <T> ListNBT |
func_219502_a(java.util.function.Function<T,ResourceLocation> p_219502_0_,
java.lang.Iterable<NextTickListEntry<T>> p_219502_1_,
long p_219502_2_) |
ListNBT |
func_219503_a(ChunkPos p_219503_1_) |
int |
func_225420_a() |
private java.util.List<NextTickListEntry<T>> |
getEntries(java.util.List<NextTickListEntry<T>> result,
java.util.Collection<NextTickListEntry<T>> entries,
MutableBoundingBox bb,
boolean remove) |
java.util.List<NextTickListEntry<T>> |
getPending(ChunkPos pos,
boolean remove,
boolean skipCompleted) |
java.util.List<NextTickListEntry<T>> |
getPending(MutableBoundingBox p_205366_1_,
boolean remove,
boolean skipCompleted) |
boolean |
isTickPending(BlockPos pos,
T obj) |
boolean |
isTickScheduled(BlockPos pos,
T itemIn) |
void |
scheduleTick(BlockPos pos,
T itemIn,
int scheduledTime,
TickPriority priority) |
void |
tick() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
scheduleTick
protected final java.util.function.Predicate<T> filter
private final java.util.function.Function<T,ResourceLocation> serializer
private final java.util.function.Function<ResourceLocation,T> deserializer
private final java.util.Set<NextTickListEntry<T>> pendingTickListEntriesHashSet
private final java.util.TreeSet<NextTickListEntry<T>> pendingTickListEntriesTreeSet
private final ServerWorld world
private final java.util.Queue<NextTickListEntry<T>> pendingTickListEntriesThisTick
private final java.util.List<NextTickListEntry<T>> entriesRunThisTick
private final java.util.function.Consumer<NextTickListEntry<T>> tickFunction
public ServerTickList(ServerWorld worldIn, java.util.function.Predicate<T> filter, java.util.function.Function<T,ResourceLocation> serializerIn, java.util.function.Function<ResourceLocation,T> deserializerIn, java.util.function.Consumer<NextTickListEntry<T>> tickFunctionIn)
public void tick()
public boolean isTickPending(BlockPos pos, T obj)
isTickPending
in interface ITickList<T>
public void addAll(java.util.stream.Stream<NextTickListEntry<T>> p_219497_1_)
public java.util.List<NextTickListEntry<T>> getPending(ChunkPos pos, boolean remove, boolean skipCompleted)
public java.util.List<NextTickListEntry<T>> getPending(MutableBoundingBox p_205366_1_, boolean remove, boolean skipCompleted)
@Nullable private java.util.List<NextTickListEntry<T>> getEntries(@Nullable java.util.List<NextTickListEntry<T>> result, java.util.Collection<NextTickListEntry<T>> entries, MutableBoundingBox bb, boolean remove)
public void copyTicks(MutableBoundingBox area, BlockPos offset)
public static <T> ListNBT func_219502_a(java.util.function.Function<T,ResourceLocation> p_219502_0_, java.lang.Iterable<NextTickListEntry<T>> p_219502_1_, long p_219502_2_)
public boolean isTickScheduled(BlockPos pos, T itemIn)
isTickScheduled
in interface ITickList<T>
public void scheduleTick(BlockPos pos, T itemIn, int scheduledTime, TickPriority priority)
scheduleTick
in interface ITickList<T>
private void addEntry(NextTickListEntry<T> p_219504_1_)
public int func_225420_a()