Package net.minecraft.server.world
Class LevelPrioritizedQueue<T>
java.lang.Object
net.minecraft.server.world.LevelPrioritizedQueue<T>
public class LevelPrioritizedQueue<T> extends Object
-
Field Summary
Fields Modifier and Type Field Description private LongSet
blockingChunks
private int
firstNonEmptyLevel
static int
LEVEL_COUNT
private List<Long2ObjectLinkedOpenHashMap<List<Optional<T>>>>
levelToPosToElements
private int
maxBlocking
private String
name
-
Constructor Summary
Constructors Constructor Description LevelPrioritizedQueue(String name, int maxSize)
-
Method Summary
Modifier and Type Method Description protected void
add(Optional<T> element, long pos, int level)
private Runnable
createBlockingAdder(long pos)
(package private) LongSet
getBlockingChunks()
Stream<com.mojang.datafixers.util.Either<T,Runnable>>
poll()
protected void
remove(long pos, boolean removeElement)
String
toString()
protected void
updateLevel(int fromLevel, ChunkPos pos, int toLevel)
-
Field Details
-
LEVEL_COUNT
public static final int LEVEL_COUNT -
levelToPosToElements
-
firstNonEmptyLevel
private volatile int firstNonEmptyLevel -
name
-
blockingChunks
-
maxBlocking
private final int maxBlocking
-
-
Constructor Details
-
LevelPrioritizedQueue
-
-
Method Details