Package net.minecraft.world.server
Class ServerTickList<T>
- java.lang.Object
-
- net.minecraft.world.server.ServerTickList<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<NextTickListEntry<T>>
alreadyTicked
private java.util.Queue<NextTickListEntry<T>>
currentlyTicking
protected java.util.function.Predicate<T>
ignore
private ServerWorld
level
private java.util.function.Consumer<NextTickListEntry<T>>
ticker
private java.util.TreeSet<NextTickListEntry<T>>
tickNextTickList
private java.util.Set<NextTickListEntry<T>>
tickNextTickSet
private java.util.function.Function<T,ResourceLocation>
toId
-
Constructor Summary
Constructors Constructor Description ServerTickList(ServerWorld p_i231625_1_, java.util.function.Predicate<T> p_i231625_2_, java.util.function.Function<T,ResourceLocation> p_i231625_3_, java.util.function.Consumer<NextTickListEntry<T>> p_i231625_4_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addTickData(NextTickListEntry<T> p_219504_1_)
void
copy(MutableBoundingBox p_205368_1_, BlockPos p_205368_2_)
private java.util.List<NextTickListEntry<T>>
fetchTicksInArea(java.util.List<NextTickListEntry<T>> p_223187_1_, java.util.Collection<NextTickListEntry<T>> p_223187_2_, MutableBoundingBox p_223187_3_, boolean p_223187_4_)
java.util.List<NextTickListEntry<T>>
fetchTicksInArea(MutableBoundingBox p_205366_1_, boolean p_205366_2_, boolean p_205366_3_)
java.util.List<NextTickListEntry<T>>
fetchTicksInChunk(ChunkPos p_223188_1_, boolean p_223188_2_, boolean p_223188_3_)
boolean
hasScheduledTick(BlockPos p_205359_1_, T p_205359_2_)
ListNBT
save(ChunkPos p_219503_1_)
private static <T> ListNBT
saveTickList(java.util.function.Function<T,ResourceLocation> p_219502_0_, java.lang.Iterable<NextTickListEntry<T>> p_219502_1_, long p_219502_2_)
void
scheduleTick(BlockPos p_205362_1_, T p_205362_2_, int p_205362_3_, TickPriority p_205362_4_)
int
size()
void
tick()
boolean
willTickThisTick(BlockPos p_205361_1_, T p_205361_2_)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.world.ITickList
scheduleTick
-
-
-
-
Field Detail
-
ignore
protected final java.util.function.Predicate<T> ignore
-
toId
private final java.util.function.Function<T,ResourceLocation> toId
-
tickNextTickSet
private final java.util.Set<NextTickListEntry<T>> tickNextTickSet
-
tickNextTickList
private final java.util.TreeSet<NextTickListEntry<T>> tickNextTickList
-
level
private final ServerWorld level
-
currentlyTicking
private final java.util.Queue<NextTickListEntry<T>> currentlyTicking
-
alreadyTicked
private final java.util.List<NextTickListEntry<T>> alreadyTicked
-
ticker
private final java.util.function.Consumer<NextTickListEntry<T>> ticker
-
-
Constructor Detail
-
ServerTickList
public ServerTickList(ServerWorld p_i231625_1_, java.util.function.Predicate<T> p_i231625_2_, java.util.function.Function<T,ResourceLocation> p_i231625_3_, java.util.function.Consumer<NextTickListEntry<T>> p_i231625_4_)
-
-
Method Detail
-
tick
public void tick()
-
willTickThisTick
public boolean willTickThisTick(BlockPos p_205361_1_, T p_205361_2_)
- Specified by:
willTickThisTick
in interfaceITickList<T>
-
fetchTicksInChunk
public java.util.List<NextTickListEntry<T>> fetchTicksInChunk(ChunkPos p_223188_1_, boolean p_223188_2_, boolean p_223188_3_)
-
fetchTicksInArea
public java.util.List<NextTickListEntry<T>> fetchTicksInArea(MutableBoundingBox p_205366_1_, boolean p_205366_2_, boolean p_205366_3_)
-
fetchTicksInArea
@Nullable private java.util.List<NextTickListEntry<T>> fetchTicksInArea(@Nullable java.util.List<NextTickListEntry<T>> p_223187_1_, java.util.Collection<NextTickListEntry<T>> p_223187_2_, MutableBoundingBox p_223187_3_, boolean p_223187_4_)
-
copy
public void copy(MutableBoundingBox p_205368_1_, BlockPos p_205368_2_)
-
saveTickList
private static <T> ListNBT saveTickList(java.util.function.Function<T,ResourceLocation> p_219502_0_, java.lang.Iterable<NextTickListEntry<T>> p_219502_1_, long p_219502_2_)
-
hasScheduledTick
public boolean hasScheduledTick(BlockPos p_205359_1_, T p_205359_2_)
- Specified by:
hasScheduledTick
in interfaceITickList<T>
-
scheduleTick
public void scheduleTick(BlockPos p_205362_1_, T p_205362_2_, int p_205362_3_, TickPriority p_205362_4_)
- Specified by:
scheduleTick
in interfaceITickList<T>
-
addTickData
private void addTickData(NextTickListEntry<T> p_219504_1_)
-
size
public int size()
-
-