Package net.minecraft.server.level
Class DistanceManager
java.lang.Object
net.minecraft.server.level.DistanceManager
- Direct Known Subclasses:
ChunkMap.DistanceManager
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
(package private) class
(package private) class
-
Field Summary
Modifier and TypeFieldDescription(package private) Set<ChunkHolder>
private static int
private it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>>
private static int
(package private) static org.apache.logging.log4j.Logger
(package private) Executor
(package private) static int
(package private) it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.ObjectSet<ServerPlayer>>
(package private) it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>>
(package private) it.unimi.dsi.fastutil.longs.LongSet
(package private) ChunkTaskPriorityQueueSorter
(package private) ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>>
(package private) ProcessorHandle<ChunkTaskPriorityQueueSorter.Release>
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlayer(SectionPos p_140803_, ServerPlayer p_140804_)
<T> void
addRegionTicket(TicketType<T> p_140841_, ChunkPos p_140842_, int p_140843_, T p_140844_)
(package private) void
<T> void
addTicket(TicketType<T> p_140793_, ChunkPos p_140794_, int p_140795_, T p_140796_)
private void
dumpTickets(String p_143208_)
protected abstract ChunkHolder
getChunk(long p_140817_)
int
protected String
getTicketDebugString(long p_140839_)
private static int
getTicketLevelAt(SortedArraySet<Ticket<?>> p_140798_)
private SortedArraySet<Ticket<?>>
getTickets(long p_140858_)
boolean
hasPlayersNearby(long p_140848_)
protected abstract boolean
isChunkToRemove(long p_140779_)
protected void
<T> void
registerTicking(TicketType<T> type, ChunkPos pos, int distance, T value)
<T> void
releaseTicking(TicketType<T> type, ChunkPos pos, int distance, T value)
void
removePlayer(SectionPos p_140829_, ServerPlayer p_140830_)
<T> void
removeRegionTicket(TicketType<T> p_140850_, ChunkPos p_140851_, int p_140852_, T p_140853_)
(package private) void
removeTicket(long p_140819_, Ticket<?> p_140820_)
<T> void
removeTicket(TicketType<T> p_140824_, ChunkPos p_140825_, int p_140826_, T p_140827_)
boolean
runAllUpdates(ChunkMap p_140806_)
boolean
shouldForceTicks(long chunkPos)
protected void
updateChunkForced(ChunkPos p_140800_, boolean p_140801_)
protected abstract ChunkHolder
updateChunkScheduling(long p_140780_, int p_140781_, ChunkHolder p_140782_, int p_140783_)
protected void
updatePlayerTickets(int p_140778_)
-
Field Details
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
ENTITY_TICKING_RANGE
private static final int ENTITY_TICKING_RANGE- See Also:
- Constant Field Values
-
PLAYER_TICKET_LEVEL
static final int PLAYER_TICKET_LEVEL -
INITIAL_TICKET_LIST_CAPACITY
private static final int INITIAL_TICKET_LIST_CAPACITY- See Also:
- Constant Field Values
-
playersPerChunk
final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.ObjectSet<ServerPlayer>> playersPerChunk -
tickets
-
ticketTracker
-
naturalSpawnChunkCounter
-
playerTicketManager
-
chunksToUpdateFutures
-
ticketThrottler
-
ticketThrottlerInput
-
ticketThrottlerReleaser
-
ticketsToRelease
final it.unimi.dsi.fastutil.longs.LongSet ticketsToRelease -
mainThreadExecutor
-
ticketTickCounter
private long ticketTickCounter -
forcedTickets
private final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> forcedTickets
-
-
Constructor Details
-
DistanceManager
-
-
Method Details
-
purgeStaleTickets
protected void purgeStaleTickets() -
getTicketLevelAt
-
isChunkToRemove
protected abstract boolean isChunkToRemove(long p_140779_) -
getChunk
-
updateChunkScheduling
@Nullable protected abstract ChunkHolder updateChunkScheduling(long p_140780_, int p_140781_, @Nullable ChunkHolder p_140782_, int p_140783_) -
runAllUpdates
-
addTicket
-
removeTicket
-
addTicket
-
removeTicket
public <T> void removeTicket(TicketType<T> p_140824_, ChunkPos p_140825_, int p_140826_, T p_140827_) -
addRegionTicket
public <T> void addRegionTicket(TicketType<T> p_140841_, ChunkPos p_140842_, int p_140843_, T p_140844_) -
removeRegionTicket
public <T> void removeRegionTicket(TicketType<T> p_140850_, ChunkPos p_140851_, int p_140852_, T p_140853_) -
registerTicking
-
releaseTicking
-
getTickets
-
updateChunkForced
-
addPlayer
-
removePlayer
-
getTicketDebugString
-
updatePlayerTickets
protected void updatePlayerTickets(int p_140778_) -
getNaturalSpawnChunkCount
public int getNaturalSpawnChunkCount() -
hasPlayersNearby
public boolean hasPlayersNearby(long p_140848_) -
getDebugStatus
-
shouldForceTicks
public boolean shouldForceTicks(long chunkPos) -
dumpTickets
-