net.minecraft.server.level

public class ChunkMap

extends ChunkStorage implements ChunkHolder$PlayerProvider, GeneratingChunkMap

All mapped superinterfaces:

ChunkHolder$PlayerProvider, GeneratingChunkMap

aqb
net.minecraft.server.level.ChunkMap
net.minecraft.class_3898
net.minecraft.server.world.ServerChunkLoadingManager
net.minecraft.src.C_5429_
net.minecraft.server.level.PlayerChunkMap

Field summary

Modifier and TypeField
private static final ChunkResult<List<ChunkAccess>>
f
UNLOADED_CHUNK_LIST_RESULT
field_51862
UNLOADED_CHUNKS
f_336919_
private static final CompletableFuture<ChunkResult<List<ChunkAccess>>>
g
UNLOADED_CHUNK_LIST_FUTURE
field_51863
UNLOADED_CHUNKS_FUTURE
f_337118_
private static final byte
h
CHUNK_TYPE_REPLACEABLE
field_29671
PROTO_CHUNK
f_143034_
private static final byte
i
CHUNK_TYPE_UNKNOWN
field_29672
UNMARKED_CHUNK
f_143035_
private static final byte
j
CHUNK_TYPE_FULL
field_29673
LEVEL_CHUNK
f_143036_
private static final org.slf4j.Logger
k
LOGGER
field_17212
LOGGER
f_140128_
private static final int
l
CHUNK_SAVED_PER_TICK
field_29674
field_29674
f_143037_
private static final int
m
CHUNK_SAVED_EAGERLY_PER_TICK
field_36291
field_36291
f_198789_
private static final int
n
EAGER_CHUNK_SAVE_COOLDOWN_IN_MILLIS
field_36384
field_36384
f_202982_
public static final int
a
MIN_VIEW_DISTANCE
field_29675
DEFAULT_VIEW_DISTANCE
f_143038_
public static final int
b
MAX_VIEW_DISTANCE
field_29669
field_29669
f_143032_
public static final int
c
FORCED_TICKET_LEVEL
field_29670
field_29670
f_143033_
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
o
updatingChunkMap
field_17213
currentChunkHolders
f_140129_
private volatile it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
p
visibleChunkMap
field_17220
chunkHolders
f_140130_
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
q
pendingUnloads
field_18807
chunksToUnload
f_140131_
private final List<ChunkGenerationTask>
r
pendingGenerationTasks
field_51864
loaders
f_337610_
final ServerLevel
s
level
field_17214
world
f_140133_
private final ThreadedLevelLightEngine
t
lightEngine
field_17215
lightingProvider
f_140134_
private final BlockableEventLoop<Runnable>
u
mainThreadExecutor
field_17216
mainThreadExecutor
f_140135_
private final RandomState
v
randomState
field_37278
noiseConfig
f_214834_
private final ChunkGeneratorStructureState
w
chunkGeneratorState
field_40856
structurePlacementCalculator
f_254626_
private final Supplier<DimensionDataStorage>
x
overworldDataStorage
field_17705
persistentStateManagerFactory
f_140137_
private final PoiManager
y
poiManager
field_18808
pointOfInterestStorage
f_140138_
final it.unimi.dsi.fastutil.longs.LongSet
z
toDrop
field_17221
unloadedChunks
f_140139_
private boolean
A
modified
field_17222
chunkHolderListDirty
f_140140_
private final ChunkTaskPriorityQueueSorter
B
queueSorter
field_17223
chunkTaskPrioritySystem
f_140141_
private final ProcessorHandle<ChunkTaskPriorityQueueSorter$Message<Runnable>>
C
worldgenMailbox
field_17224
worldGenExecutor
f_140142_
private final ProcessorHandle<ChunkTaskPriorityQueueSorter$Message<Runnable>>
D
mainThreadMailbox
field_17226
mainExecutor
f_140143_
private final ChunkProgressListener
E
progressListener
field_17442
worldGenerationProgressListener
f_140144_
private final ChunkStatusUpdateListener
F
chunkStatusListener
field_26931
chunkStatusChangeListener
f_143031_
private final ChunkMap$DistanceManager
G
distanceManager
field_17228
ticketManager
f_140145_
private final AtomicInteger
H
tickingGenerated
field_17230
totalChunksLoadedCount
f_140146_
private final String
I
storageName
field_17707
saveDir
f_182284_
private final PlayerMap
J
playerMap
field_18241
playerChunkWatchingManager
f_140149_
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChunkMap$TrackedEntity>
K
entityMap
field_18242
entityTrackers
f_140150_
private final it.unimi.dsi.fastutil.longs.Long2ByteMap
L
chunkTypeCache
field_23786
chunkToType
f_140151_
private final it.unimi.dsi.fastutil.longs.Long2LongMap
M
chunkSaveCooldowns
field_36383
chunkToNextSaveTimeMs
f_202981_
private final Queue<Runnable>
N
unloadQueue
field_19343
unloadTaskQueue
f_140125_
private int
O
serverViewDistance
field_18243
watchDistance
f_290679_
private final WorldGenContext
P
worldGenContext
field_51861
generationContext
f_314073_

Constructor summary

ModifierConstructor
public (ServerLevel world, LevelStorageSource$LevelStorageAccess session, com.mojang.datafixers.DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync)

Method summary

Modifier and TypeMethod
protected ChunkGenerator
a()
generator()
method_37897()
getChunkGenerator()
m_183719_()
protected ChunkGeneratorStructureState
b()
generatorState()
method_46641()
getStructurePlacementCalculator()
m_255435_()
protected RandomState
c()
randomState()
method_41247()
getNoiseConfig()
m_214914_()
private static double
a(dcd arg0, bsr arg1)
euclideanDistanceSquared(ChunkPos arg0, Entity arg1)
method_18704(class_1923 arg0, class_1297 arg1)
getSquaredDistance(ChunkPos pos, Entity entity)
m_140226_(C_1560_ p_140227_, C_507_ p_140228_)
boolean
a(aqv arg0, int arg1, int arg2)
isChunkTracked(ServerPlayer arg0, int arg1, int arg2)
method_52345(class_3222 arg0, int arg1, int arg2)
isTracked(ServerPlayerEntity player, int chunkX, int chunkZ)
m_295978_(C_13_ p_301041_, int p_300379_, int arg2)
private boolean
b(aqv arg0, int arg1, int arg2)
isChunkOnTrackedBorder(ServerPlayer arg0, int arg1, int arg2)
method_52351(class_3222 arg0, int arg1, int arg2)
isOnTrackEdge(ServerPlayerEntity player, int chunkX, int chunkZ)
m_293654_(C_13_ p_300477_, int p_298067_, int arg2)
protected ThreadedLevelLightEngine
d()
getLightEngine()
method_17212()
getLightingProvider()
m_140166_()
protected ChunkHolder
a(long arg0)
getUpdatingChunkIfPresent(long arg0)
method_17255(long arg0)
getCurrentChunkHolder(long pos)
m_140174_(long arg0)
protected ChunkHolder
b(long arg0)
getVisibleChunkIfPresent(long arg0)
method_17216(long arg0)
getChunkHolder(long pos)
m_140327_(long arg0)
protected IntSupplier
c(long arg0)
getChunkQueueLevel(long arg0)
method_17604(long arg0)
getCompletedLevelSupplier(long pos)
m_140371_(long arg0)
public String
a(dcd arg0)
getChunkDebugData(ChunkPos arg0)
method_23272(class_1923 arg0)
getChunkLoadingDebugInfo(ChunkPos chunkPos)
m_140204_(C_1560_ arg0)
private CompletableFuture<ChunkResult<List<ChunkAccess>>>
a(apz arg0, int arg1, IntFunction<dvz> arg2)
getChunkRangeFuture(ChunkHolder arg0, int arg1, IntFunction<ChunkStatus> arg2)
method_17220(class_3193 arg0, int arg1, IntFunction<class_2806> arg2)
getRegion(ChunkHolder centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus)
m_280541_(C_5422_ p_282030_, int p_282923_, IntFunction<C_313554_> arg2)
public ReportedException
a(IllegalStateException arg0, String arg1)
debugFuturesAndCreateReportedException(IllegalStateException arg0, String arg1)
method_40067(IllegalStateException arg0, String arg1)
crash(IllegalStateException exception, String details)
m_203751_(IllegalStateException p_203753_, String arg1)
public CompletableFuture<ChunkResult<LevelChunk>>
a(apz arg0)
prepareEntityTickingChunk(ChunkHolder arg0)
method_17247(class_3193 arg0)
makeChunkEntitiesTickable(ChunkHolder holder)
m_280208_(C_5422_ arg0)
ChunkHolder
a(long arg0, int arg1, apz arg2, int arg3)
updateChunkScheduling(long arg0, int arg1, ChunkHolder arg2, int arg3)
method_17217(long arg0, int arg1, class_3193 arg2, int arg3)
setLevel(long pos, int level, ChunkHolder holder, int arg3)
m_140176_(long p_140178_, int p_140180_, C_5422_ arg2, int arg3)
public void
close()
close()
close()
protected void
a(boolean arg0)
saveAllChunks(boolean arg0)
method_17242(boolean arg0)
save(boolean flush)
m_140318_(boolean arg0)
protected void
a(BooleanSupplier arg0)
tick(BooleanSupplier arg0)
method_17233(BooleanSupplier arg0)
tick(BooleanSupplier shouldKeepTicking)
m_140280_(BooleanSupplier arg0)
public boolean
e()
hasWork()
method_39992()
shouldDelayShutdown()
m_201907_()
private void
b(BooleanSupplier arg0)
processUnloads(BooleanSupplier arg0)
method_20605(BooleanSupplier arg0)
unloadChunks(BooleanSupplier shouldKeepTicking)
m_140353_(BooleanSupplier arg0)
private void
a(long arg0, apz arg1)
scheduleUnload(long arg0, ChunkHolder arg1)
method_20458(long arg0, class_3193 arg1)
tryUnloadChunk(long pos, ChunkHolder holder)
m_140181_(long p_140183_, C_5422_ arg1)
protected boolean
f()
promoteChunkMap()
method_17244()
updateHolderMap()
m_140324_()
private CompletableFuture<ChunkAccess>
f(dcd arg0)
scheduleChunkLoad(ChunkPos arg0)
method_20619(class_1923 arg0)
loadChunk(ChunkPos pos)
m_140417_(C_1560_ arg0)
private static boolean
b(ub arg0)
isChunkDataValid(CompoundTag arg0)
method_43380(class_2487 arg0)
containsStatus(NbtCompound nbt)
m_214940_(C_4917_ p_214941_)
private ChunkAccess
a(Throwable arg0, dcd arg1)
handleChunkLoadFailure(Throwable arg0, ChunkPos arg1)
method_43376(Throwable arg0, class_1923 arg1)
recoverFromException(Throwable throwable, ChunkPos chunkPos)
m_214901_(Throwable p_214903_, C_1560_ arg1)
private ChunkAccess
g(dcd arg0)
createEmptyChunk(ChunkPos arg0)
method_43382(class_1923 arg0)
getProtoChunk(ChunkPos chunkPos)
m_214961_(C_1560_ arg0)
private void
h(dcd arg0)
markPositionReplaceable(ChunkPos arg0)
method_27054(class_1923 arg0)
markAsProtoChunk(ChunkPos pos)
m_140422_(C_1560_ arg0)
private byte
a(dcd arg0, dwd arg1)
markPosition(ChunkPos arg0, ChunkType arg1)
method_27053(class_1923 arg0, class_2808 arg1)
mark(ChunkPos pos, ChunkType type)
m_140229_(C_1560_ p_328844_, C_313671_ arg1)
public GenerationChunkHolder
d(long arg0)
acquireGeneration(long arg0)
method_60448(long arg0)
acquire(long arg0)
m_339158_(long arg0)
public void
a(aqn arg0)
releaseGeneration(GenerationChunkHolder arg0)
method_60441(class_9761 arg0)
release(AbstractChunkHolder arg0)
m_338685_(C_336526_ arg0)
public CompletableFuture<ChunkAccess>
a(aqn arg0, dwc arg1, azi<aqn> arg2)
applyStep(GenerationChunkHolder arg0, ChunkStep arg1, StaticCache2D<GenerationChunkHolder> arg2)
method_60442(class_9761 arg0, class_9770 arg1, class_9762<class_9761> arg2)
generate(AbstractChunkHolder arg0, ChunkGenerationStep arg1, BoundedRegionArray<AbstractChunkHolder> arg2)
m_338637_(C_336526_ p_344471_, C_336565_ p_343410_, C_336561_<C_336526_> arg2)
public ChunkGenerationTask
a(dvz arg0, dcd arg1)
scheduleGenerationTask(ChunkStatus arg0, ChunkPos arg1)
method_60443(class_2806 arg0, class_1923 arg1)
createLoader(ChunkStatus arg0, ChunkPos arg1)
m_338350_(C_313554_ p_342957_, C_1560_ arg1)
private void
a(apy arg0)
runGenerationTask(ChunkGenerationTask arg0)
method_60439(class_9759 arg0)
schedule(ChunkLoader chunkLoader)
m_340434_(C_336542_ arg0)
public void
g()
runGenerationTasks()
method_60450()
updateChunks()
m_339290_()
public CompletableFuture<ChunkResult<LevelChunk>>
b(apz arg0)
prepareTickingChunk(ChunkHolder arg0)
method_17235(class_3193 arg0)
makeChunkTickable(ChunkHolder holder)
m_143053_(C_5422_ arg0)
private void
a(dvi arg0)
onChunkReadyToSend(LevelChunk arg0)
method_53686(class_2818 arg0)
sendToPlayers(WorldChunk chunk)
m_293802_(C_2137_ arg0)
public CompletableFuture<ChunkResult<LevelChunk>>
c(apz arg0)
prepareAccessibleChunk(ChunkHolder arg0)
method_31417(class_3193 arg0)
makeChunkAccessible(ChunkHolder holder)
m_143109_(C_5422_ arg0)
public int
h()
getTickingGenerated()
method_17253()
getTotalChunksLoadedCount()
m_140368_()
private boolean
d(apz arg0)
saveChunkIfNeeded(ChunkHolder arg0)
method_39925(class_3193 arg0)
save(ChunkHolder chunkHolder)
m_198874_(C_5422_ arg0)
private boolean
a(duy arg0)
save(ChunkAccess arg0)
method_17228(class_2791 arg0)
save(Chunk chunk)
m_140258_(C_2116_ arg0)
private boolean
i(dcd arg0)
isExistingChunkFull(ChunkPos arg0)
method_27055(class_1923 arg0)
isLevelChunk(ChunkPos pos)
m_140425_(C_1560_ arg0)
protected void
a(int arg0)
setServerViewDistance(int arg0)
method_17214(int arg0)
setViewDistance(int watchDistance)
m_293413_(int arg0)
int
b(aqv arg0)
getPlayerViewDistance(ServerPlayer arg0)
method_52350(class_3222 arg0)
getViewDistance(ServerPlayerEntity player)
m_294650_(C_13_ arg0)
private void
a(aqv arg0, dcd arg1)
markChunkPendingToSend(ServerPlayer arg0, ChunkPos arg1)
method_52347(class_3222 arg0, class_1923 arg1)
track(ServerPlayerEntity player, ChunkPos pos)
m_294841_(C_13_ p_298062_, C_1560_ arg1)
private static void
a(aqv arg0, dvi arg1)
markChunkPendingToSend(ServerPlayer arg0, LevelChunk arg1)
method_52348(class_3222 arg0, class_2818 arg1)
track(ServerPlayerEntity player, WorldChunk chunk)
m_296018_(C_13_ p_299135_, C_2137_ p_301128_)
private static void
b(aqv arg0, dcd arg1)
dropChunk(ServerPlayer arg0, ChunkPos arg1)
method_52352(class_3222 arg0, class_1923 arg1)
untrack(ServerPlayerEntity player, ChunkPos pos)
m_295122_(C_13_ p_300364_, C_1560_ p_299541_)
public LevelChunk
e(long arg0)
getChunkToSend(long arg0)
method_53688(long arg0)
getPostProcessedChunk(long pos)
m_295187_(long arg0)
public int
i()
size()
method_17260()
getLoadedChunkCount()
m_140394_()
public DistanceManager
j()
getDistanceManager()
method_17263()
getTicketManager()
m_143145_()
protected Iterable<ChunkHolder>
k()
getChunks()
method_17264()
entryIterator()
m_140416_()
void
a(Writer arg0)
dumpChunks(Writer arg0)
method_21619(Writer arg0)
dump(Writer writer)
m_140274_(Writer arg0)
private static String
a(CompletableFuture<aqc<dvi>> arg0)
printFuture(CompletableFuture<ChunkResult<LevelChunk>> arg0)
method_21676(CompletableFuture<class_9259<class_2818>> arg0)
getFutureStatus(CompletableFuture<OptionalChunk<WorldChunk>> future)
m_140278_(CompletableFuture<C_313292_<C_2137_>> p_140279_)
private CompletableFuture<Optional<CompoundTag>>
j(dcd arg0)
readChunk(ChunkPos arg0)
method_43383(class_1923 arg0)
getUpdatedChunkNbt(ChunkPos chunkPos)
m_214963_(C_1560_ arg0)
private CompoundTag
c(ub arg0)
upgradeChunkTag(CompoundTag arg0)
method_43381(class_2487 arg0)
updateChunkNbt(NbtCompound nbt)
m_214947_(C_4917_ arg0)
boolean
b(dcd arg0)
anyPlayerCloseEnoughForSpawning(ChunkPos arg0)
method_38783(class_1923 arg0)
shouldTick(ChunkPos pos)
m_183879_(C_1560_ arg0)
public List<ServerPlayer>
c(dcd arg0)
getPlayersCloseForSpawning(ChunkPos arg0)
method_37907(class_1923 arg0)
getPlayersWatchingChunk(ChunkPos pos)
m_183888_(C_1560_ arg0)
private boolean
c(aqv arg0, dcd arg1)
playerIsCloseEnoughForSpawning(ServerPlayer arg0, ChunkPos arg1)
method_38782(class_3222 arg0, class_1923 arg1)
canTickChunk(ServerPlayerEntity player, ChunkPos pos)
m_183751_(C_13_ p_183753_, C_1560_ arg1)
private boolean
c(aqv arg0)
skipPlayer(ServerPlayer arg0)
method_18722(class_3222 arg0)
doesNotGenerateChunks(ServerPlayerEntity player)
m_140329_(C_13_ arg0)
void
a(aqv arg0, boolean arg1)
updatePlayerStatus(ServerPlayer arg0, boolean arg1)
method_18714(class_3222 arg0, boolean arg1)
handlePlayerAddedOrRemoved(ServerPlayerEntity player, boolean added)
m_140192_(C_13_ p_140194_, boolean arg1)
private void
d(aqv arg0)
updatePlayerPos(ServerPlayer arg0)
method_20726(class_3222 arg0)
updateWatchedSection(ServerPlayerEntity player)
m_140373_(C_13_ arg0)
public void
a(aqv arg0)
move(ServerPlayer arg0)
method_18713(class_3222 arg0)
updatePosition(ServerPlayerEntity player)
m_140184_(C_13_ arg0)
private void
e(aqv arg0)
updateChunkTracking(ServerPlayer arg0)
method_17241(class_3222 arg0)
sendWatchPackets(ServerPlayerEntity player)
m_183754_(C_13_ arg0)
private void
a(aqv arg0, aqg arg1)
applyChunkTrackingView(ServerPlayer arg0, ChunkTrackingView arg1)
method_52346(class_3222 arg0, class_8603 arg1)
sendWatchPackets(ServerPlayerEntity player, ChunkFilter chunkFilter)
m_294836_(C_13_ p_301057_, C_290036_ arg1)
public List<ServerPlayer>
a(dcd arg0, boolean arg1)
getPlayers(ChunkPos arg0, boolean arg1)
method_17210(class_1923 arg0, boolean arg1)
getPlayersWatchingChunk(ChunkPos arg0, boolean arg1)
m_183262_(C_1560_ p_183802_, boolean arg1)
protected void
a(bsr arg0)
addEntity(Entity arg0)
method_18701(class_1297 arg0)
loadEntity(Entity entity)
m_140199_(C_507_ arg0)
protected void
b(bsr arg0)
removeEntity(Entity arg0)
method_18716(class_1297 arg0)
unloadEntity(Entity entity)
m_140331_(C_507_ arg0)
protected void
l()
tick()
method_18727()
tickEntityMovement()
m_140421_()
public void
a(bsr arg0, zg<?> arg1)
broadcast(Entity arg0, Packet<?> arg1)
method_18702(class_1297 arg0, class_2596<?> arg1)
sendToOtherNearbyPlayers(Entity entity, Packet<?> packet)
m_140201_(C_507_ p_140203_, C_5028_<?> arg1)
protected void
b(bsr arg0, zg<?> arg1)
broadcastAndSend(Entity arg0, Packet<?> arg1)
method_18717(class_1297 arg0, class_2596<?> arg1)
sendToNearbyPlayers(Entity entity, Packet<?> packet)
m_140333_(C_507_ p_140335_, C_5028_<?> arg1)
public void
a(List<duy> arg0)
resendBiomesForChunks(List<ChunkAccess> arg0)
method_49421(List<class_2791> arg0)
sendChunkBiomePackets(List<Chunk> chunks)
m_274524_(List<C_2116_> arg0)
protected PoiManager
m()
getPoiManager()
method_19488()
getPointOfInterestStorage()
m_140424_()
public String
n()
getStorageName()
method_37476()
getSaveDir()
m_182285_()
void
a(dcd arg0, aql arg1)
onFullChunkStatusChange(ChunkPos arg0, FullChunkStatus arg1)
method_31414(class_1923 arg0, class_3194 arg1)
onChunkStatusChange(ChunkPos chunkPos, ChunkLevelType levelType)
m_287285_(C_1560_ p_287685_, C_286921_ arg1)
public void
a(dcd arg0, int arg1)
waitForLightBeforeSending(ChunkPos arg0, int arg1)
method_53685(class_1923 arg0, int arg1)
forceLighting(ChunkPos centerPos, int radius)
m_293872_(C_1560_ p_300649_, int arg1)