public abstract class TicketManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
TicketManager.ChunkTicketTracker |
(package private) class |
TicketManager.PlayerChunkTracker |
(package private) class |
TicketManager.PlayerTicketTracker |
Modifier and Type | Field and Description |
---|---|
private java.util.Set<ChunkHolder> |
chunkHolders |
private long |
currentTime |
private ChunkTaskPriorityQueueSorter |
field_219384_l |
private ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>> |
field_219385_m |
private ITaskExecutor<ChunkTaskPriorityQueueSorter.RunnableEntry> |
field_219386_n |
private it.unimi.dsi.fastutil.longs.LongSet |
field_219387_o |
private java.util.concurrent.Executor |
field_219388_p |
private static org.apache.logging.log4j.Logger |
LOGGER |
private static int |
PLAYER_TICKET_LEVEL |
private TicketManager.PlayerChunkTracker |
playerChunkTracker |
private it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.ObjectSet<ServerPlayerEntity>> |
playersByChunkPos |
private TicketManager.PlayerTicketTracker |
playerTicketTracker |
private it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> |
tickets |
private TicketManager.ChunkTicketTracker |
ticketTracker |
Modifier | Constructor and Description |
---|---|
protected |
TicketManager(java.util.concurrent.Executor p_i50707_1_,
java.util.concurrent.Executor p_i50707_2_) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
contains(long p_219371_1_) |
protected void |
forceChunk(ChunkPos pos,
boolean add) |
protected abstract ChunkHolder |
func_219335_b(long chunkPosIn) |
java.lang.String |
func_225412_c() |
protected java.lang.String |
func_225413_c(long p_225413_1_) |
private static int |
func_229844_a_(SortedArraySet<Ticket<?>> p_229844_0_) |
int |
getSpawningChunksCount() |
private SortedArraySet<Ticket<?>> |
getTicketSet(long p_229848_1_) |
boolean |
isOutsideSpawningRadius(long chunkPosIn) |
boolean |
processUpdates(ChunkManager p_219353_1_) |
private void |
register(long chunkPosIn,
Ticket<?> ticketIn) |
<T> void |
register(TicketType<T> type,
ChunkPos pos,
int distance,
T value) |
<T> void |
registerWithLevel(TicketType<T> type,
ChunkPos pos,
int level,
T value) |
private void |
release(long chunkPosIn,
Ticket<?> ticketIn) |
<T> void |
release(TicketType<T> type,
ChunkPos pos,
int distance,
T value) |
<T> void |
releaseWithLevel(TicketType<T> type,
ChunkPos pos,
int level,
T value) |
void |
removePlayer(SectionPos sectionPosIn,
ServerPlayerEntity player) |
protected abstract ChunkHolder |
setChunkLevel(long chunkPosIn,
int newLevel,
ChunkHolder holder,
int oldLevel) |
protected void |
setViewDistance(int viewDistance) |
protected void |
tick() |
void |
updatePlayerPosition(SectionPos sectionPosIn,
ServerPlayerEntity player) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final int PLAYER_TICKET_LEVEL
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.ObjectSet<ServerPlayerEntity>> playersByChunkPos
private final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets
private final TicketManager.ChunkTicketTracker ticketTracker
private final TicketManager.PlayerChunkTracker playerChunkTracker
private final TicketManager.PlayerTicketTracker playerTicketTracker
private final java.util.Set<ChunkHolder> chunkHolders
private final ChunkTaskPriorityQueueSorter field_219384_l
private final ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<java.lang.Runnable>> field_219385_m
private final ITaskExecutor<ChunkTaskPriorityQueueSorter.RunnableEntry> field_219386_n
private final it.unimi.dsi.fastutil.longs.LongSet field_219387_o
private final java.util.concurrent.Executor field_219388_p
private long currentTime
protected TicketManager(java.util.concurrent.Executor p_i50707_1_, java.util.concurrent.Executor p_i50707_2_)
protected void tick()
private static int func_229844_a_(SortedArraySet<Ticket<?>> p_229844_0_)
protected abstract boolean contains(long p_219371_1_)
@Nullable protected abstract ChunkHolder func_219335_b(long chunkPosIn)
@Nullable protected abstract ChunkHolder setChunkLevel(long chunkPosIn, int newLevel, @Nullable ChunkHolder holder, int oldLevel)
public boolean processUpdates(ChunkManager p_219353_1_)
private void register(long chunkPosIn, Ticket<?> ticketIn)
private void release(long chunkPosIn, Ticket<?> ticketIn)
public <T> void registerWithLevel(TicketType<T> type, ChunkPos pos, int level, T value)
public <T> void releaseWithLevel(TicketType<T> type, ChunkPos pos, int level, T value)
public <T> void register(TicketType<T> type, ChunkPos pos, int distance, T value)
public <T> void release(TicketType<T> type, ChunkPos pos, int distance, T value)
private SortedArraySet<Ticket<?>> getTicketSet(long p_229848_1_)
protected void forceChunk(ChunkPos pos, boolean add)
public void updatePlayerPosition(SectionPos sectionPosIn, ServerPlayerEntity player)
public void removePlayer(SectionPos sectionPosIn, ServerPlayerEntity player)
protected java.lang.String func_225413_c(long p_225413_1_)
protected void setViewDistance(int viewDistance)
public int getSpawningChunksCount()
public boolean isOutsideSpawningRadius(long chunkPosIn)
public java.lang.String func_225412_c()