net.minecraft.server.level

public class ChunkMap

extends ChunkStorage implements ChunkHolder$PlayerProvider, GeneratingChunkMap

All mapped superinterfaces:

ChunkHolder$PlayerProvider, GeneratingChunkMap

aqi
net.minecraft.server.level.ChunkMap
net.minecraft.class_3898
net.minecraft.server.world.ServerChunkLoadingManager
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
private static final CompletableFuture<ChunkResult<List<ChunkAccess>>>
g
UNLOADED_CHUNK_LIST_FUTURE
field_51863
UNLOADED_CHUNKS_FUTURE
private static final byte
h
CHUNK_TYPE_REPLACEABLE
field_29671
PROTO_CHUNK
private static final byte
i
CHUNK_TYPE_UNKNOWN
field_29672
UNMARKED_CHUNK
private static final byte
j
CHUNK_TYPE_FULL
field_29673
LEVEL_CHUNK
private static final org.slf4j.Logger
k
LOGGER
field_17212
LOGGER
private static final int
l
CHUNK_SAVED_PER_TICK
field_29674
field_29674
private static final int
m
CHUNK_SAVED_EAGERLY_PER_TICK
field_36291
field_36291
private static final int
n
EAGER_CHUNK_SAVE_COOLDOWN_IN_MILLIS
field_36384
field_36384
private static final int
o
MAX_ACTIVE_CHUNK_WRITES
field_54966
field_54966
public static final int
a
MIN_VIEW_DISTANCE
field_29675
DEFAULT_VIEW_DISTANCE
public static final int
b
MAX_VIEW_DISTANCE
field_29669
field_29669
public static final int
c
FORCED_TICKET_LEVEL
field_29670
field_29670
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
p
updatingChunkMap
field_17213
currentChunkHolders
private volatile it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
q
visibleChunkMap
field_17220
chunkHolders
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
r
pendingUnloads
field_18807
chunksToUnload
private final List<ChunkGenerationTask>
s
pendingGenerationTasks
field_51864
loaders
final ServerLevel
t
level
field_17214
world
private final ThreadedLevelLightEngine
u
lightEngine
field_17215
lightingProvider
private final BlockableEventLoop<Runnable>
v
mainThreadExecutor
field_17216
mainThreadExecutor
private final RandomState
w
randomState
field_37278
noiseConfig
private final ChunkGeneratorStructureState
x
chunkGeneratorState
field_40856
structurePlacementCalculator
private final Supplier<DimensionDataStorage>
y
overworldDataStorage
field_17705
persistentStateManagerFactory
private final PoiManager
z
poiManager
field_18808
pointOfInterestStorage
final it.unimi.dsi.fastutil.longs.LongSet
A
toDrop
field_17221
unloadedChunks
private boolean
B
modified
field_17222
chunkHolderListDirty
private final ChunkTaskDispatcher
C
worldgenTaskDispatcher
field_54034
worldGenScheduler
private final ChunkTaskDispatcher
D
lightTaskDispatcher
field_54035
lightScheduler
private final ChunkProgressListener
E
progressListener
field_17442
worldGenerationProgressListener
private final ChunkStatusUpdateListener
F
chunkStatusListener
field_26931
chunkStatusChangeListener
private final ChunkMap$DistanceManager
G
distanceManager
field_17228
ticketManager
private final AtomicInteger
H
tickingGenerated
field_17230
totalChunksLoadedCount
private final String
I
storageName
field_17707
saveDir
private final PlayerMap
J
playerMap
field_18241
playerChunkWatchingManager
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChunkMap$TrackedEntity>
K
entityMap
field_18242
entityTrackers
private final it.unimi.dsi.fastutil.longs.Long2ByteMap
L
chunkTypeCache
field_23786
chunkToType
private final it.unimi.dsi.fastutil.longs.Long2LongMap
M
nextChunkSaveTime
field_52353
chunkToNextSaveTimeMs
private final it.unimi.dsi.fastutil.longs.LongSet
N
chunksToEagerlySave
field_54964
chunksToSave
private final Queue<Runnable>
O
unloadQueue
field_19343
unloadTaskQueue
private final AtomicInteger
P
activeChunkWrites
field_54965
chunksBeingSavedCount
private int
Q
serverViewDistance
field_18243
watchDistance
private final WorldGenContext
R
worldGenContext
field_51861
generationContext

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
private void
f(dfp arg0)
setChunkUnsaved(ChunkPos arg0)
method_65056(class_1923 arg0)
markChunkNeedsSaving(ChunkPos pos)
protected ChunkGenerator
a()
generator()
method_37897()
getChunkGenerator()
protected ChunkGeneratorStructureState
b()
generatorState()
method_46641()
getStructurePlacementCalculator()
protected RandomState
c()
randomState()
method_41247()
getNoiseConfig()
private static double
a(dfp arg0, bum arg1)
euclideanDistanceSquared(ChunkPos arg0, Entity arg1)
method_18704(class_1923 arg0, class_1297 arg1)
getSquaredDistance(ChunkPos pos, Entity entity)
boolean
a(are 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)
private boolean
b(are 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)
protected ThreadedLevelLightEngine
d()
getLightEngine()
method_17212()
getLightingProvider()
protected ChunkHolder
a(long arg0)
getUpdatingChunkIfPresent(long arg0)
method_17255(long arg0)
getCurrentChunkHolder(long pos)
protected ChunkHolder
b(long arg0)
getVisibleChunkIfPresent(long arg0)
method_17216(long arg0)
getChunkHolder(long pos)
protected IntSupplier
c(long arg0)
getChunkQueueLevel(long arg0)
method_17604(long arg0)
getCompletedLevelSupplier(long pos)
public String
a(dfp arg0)
getChunkDebugData(ChunkPos arg0)
method_23272(class_1923 arg0)
getChunkLoadingDebugInfo(ChunkPos chunkPos)
private CompletableFuture<ChunkResult<List<ChunkAccess>>>
a(aqg arg0, int arg1, IntFunction<dzu> 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)
public ReportedException
a(IllegalStateException arg0, String arg1)
debugFuturesAndCreateReportedException(IllegalStateException arg0, String arg1)
method_40067(IllegalStateException arg0, String arg1)
crash(IllegalStateException exception, String details)
public CompletableFuture<ChunkResult<LevelChunk>>
a(aqg arg0)
prepareEntityTickingChunk(ChunkHolder arg0)
method_17247(class_3193 arg0)
makeChunkEntitiesTickable(ChunkHolder holder)
ChunkHolder
a(long arg0, int arg1, aqg 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)
private void
a(dfp arg0, IntSupplier arg1, int arg2, IntConsumer arg3)
onLevelChange(ChunkPos arg0, IntSupplier arg1, int arg2, IntConsumer arg3)
method_63545(class_1923 arg0, IntSupplier arg1, int arg2, IntConsumer arg3)
updateLevel(ChunkPos pos, IntSupplier levelGetter, int targetLevel, IntConsumer levelSetter)
public void
close()
close()
protected void
a(boolean arg0)
saveAllChunks(boolean arg0)
method_17242(boolean arg0)
save(boolean flush)
protected void
a(BooleanSupplier arg0)
tick(BooleanSupplier arg0)
method_17233(BooleanSupplier arg0)
tick(BooleanSupplier shouldKeepTicking)
public boolean
e()
hasWork()
method_39992()
shouldDelayShutdown()
private void
b(BooleanSupplier arg0)
processUnloads(BooleanSupplier arg0)
method_20605(BooleanSupplier arg0)
unloadChunks(BooleanSupplier shouldKeepTicking)
private void
c(BooleanSupplier arg0)
saveChunksEagerly(BooleanSupplier arg0)
method_65055(BooleanSupplier arg0)
saveChunks(BooleanSupplier shouldKeepTicking)
private void
a(long arg0, aqg arg1)
scheduleUnload(long arg0, ChunkHolder arg1)
method_20458(long arg0, class_3193 arg1)
tryUnloadChunk(long pos, ChunkHolder chunk)
protected boolean
f()
promoteChunkMap()
method_17244()
updateHolderMap()
private CompletableFuture<ChunkAccess>
g(dfp arg0)
scheduleChunkLoad(ChunkPos arg0)
method_20619(class_1923 arg0)
loadChunk(ChunkPos pos)
private ChunkAccess
a(Throwable arg0, dfp arg1)
handleChunkLoadFailure(Throwable arg0, ChunkPos arg1)
method_43376(Throwable arg0, class_1923 arg1)
recoverFromException(Throwable throwable, ChunkPos chunkPos)
private ChunkAccess
h(dfp arg0)
createEmptyChunk(ChunkPos arg0)
method_43382(class_1923 arg0)
getProtoChunk(ChunkPos chunkPos)
private void
i(dfp arg0)
markPositionReplaceable(ChunkPos arg0)
method_27054(class_1923 arg0)
markAsProtoChunk(ChunkPos pos)
private byte
a(dfp arg0, dzy arg1)
markPosition(ChunkPos arg0, ChunkType arg1)
method_27053(class_1923 arg0, class_2808 arg1)
mark(ChunkPos pos, ChunkType type)
public GenerationChunkHolder
d(long arg0)
acquireGeneration(long arg0)
method_60448(long arg0)
acquire(long arg0)
public void
a(aqu arg0)
releaseGeneration(GenerationChunkHolder arg0)
method_60441(class_9761 arg0)
release(AbstractChunkHolder arg0)
public CompletableFuture<ChunkAccess>
a(aqu arg0, dzx arg1, azt<aqu> 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)
public ChunkGenerationTask
a(dzu arg0, dfp arg1)
scheduleGenerationTask(ChunkStatus arg0, ChunkPos arg1)
method_60443(class_2806 arg0, class_1923 arg1)
createLoader(ChunkStatus arg0, ChunkPos arg1)
private void
a(aqf arg0)
runGenerationTask(ChunkGenerationTask arg0)
method_60439(class_9759 arg0)
schedule(ChunkLoader loader)
public void
g()
runGenerationTasks()
method_60450()
updateChunks()
public CompletableFuture<ChunkResult<LevelChunk>>
b(aqg arg0)
prepareTickingChunk(ChunkHolder arg0)
method_17235(class_3193 arg0)
makeChunkTickable(ChunkHolder holder)
private void
a(aqg arg0, dzd arg1)
onChunkReadyToSend(ChunkHolder arg0, LevelChunk arg1)
method_53686(class_3193 arg0, class_2818 arg1)
sendToPlayers(ChunkHolder chunkHolder, WorldChunk chunk)
public CompletableFuture<ChunkResult<LevelChunk>>
c(aqg arg0)
prepareAccessibleChunk(ChunkHolder arg0)
method_31417(class_3193 arg0)
makeChunkAccessible(ChunkHolder holder)
public int
h()
getTickingGenerated()
method_17253()
getTotalChunksLoadedCount()
private boolean
a(aqg arg0, long arg1)
saveChunkIfNeeded(ChunkHolder arg0, long arg1)
method_39925(class_3193 arg0, long arg1)
save(ChunkHolder chunkHolder, long currentTime)
private boolean
a(dyt arg0)
save(ChunkAccess arg0)
method_17228(class_2791 arg0)
save(Chunk chunk)
private boolean
j(dfp arg0)
isExistingChunkFull(ChunkPos arg0)
method_27055(class_1923 arg0)
isLevelChunk(ChunkPos pos)
protected void
a(int arg0)
setServerViewDistance(int arg0)
method_17214(int arg0)
setViewDistance(int watchDistance)
int
b(are arg0)
getPlayerViewDistance(ServerPlayer arg0)
method_52350(class_3222 arg0)
getViewDistance(ServerPlayerEntity player)
private void
a(are arg0, dfp arg1)
markChunkPendingToSend(ServerPlayer arg0, ChunkPos arg1)
method_52347(class_3222 arg0, class_1923 arg1)
track(ServerPlayerEntity player, ChunkPos pos)
private static void
a(are arg0, dzd arg1)
markChunkPendingToSend(ServerPlayer arg0, LevelChunk arg1)
method_52348(class_3222 arg0, class_2818 arg1)
track(ServerPlayerEntity player, WorldChunk chunk)
private static void
b(are arg0, dfp arg1)
dropChunk(ServerPlayer arg0, ChunkPos arg1)
method_52352(class_3222 arg0, class_1923 arg1)
untrack(ServerPlayerEntity player, ChunkPos pos)
public LevelChunk
e(long arg0)
getChunkToSend(long arg0)
method_53688(long arg0)
getPostProcessedChunk(long pos)
public int
i()
size()
method_17260()
getLoadedChunkCount()
public DistanceManager
j()
getDistanceManager()
method_17263()
getTicketManager()
protected Iterable<ChunkHolder>
k()
getChunks()
method_17264()
entryIterator()
void
a(Writer arg0)
dumpChunks(Writer arg0)
method_21619(Writer arg0)
dump(Writer writer)
private static String
a(CompletableFuture<aqj<dzd>> arg0)
printFuture(CompletableFuture<ChunkResult<LevelChunk>> arg0)
method_21676(CompletableFuture<class_9259<class_2818>> arg0)
getFutureStatus(CompletableFuture<OptionalChunk<WorldChunk>> future)
private CompletableFuture<Optional<CompoundTag>>
k(dfp arg0)
readChunk(ChunkPos arg0)
method_43383(class_1923 arg0)
getUpdatedChunkNbt(ChunkPos chunkPos)
private CompoundTag
b(tq arg0)
upgradeChunkTag(CompoundTag arg0)
method_43381(class_2487 arg0)
updateChunkNbt(NbtCompound nbt)
void
a(Consumer<aqg> arg0)
forEachSpawnCandidateChunk(Consumer<ChunkHolder> arg0)
method_61260(Consumer<class_3193> arg0)
forEachTickedChunk(Consumer<ChunkHolder> callback)
boolean
b(dfp arg0)
anyPlayerCloseEnoughForSpawning(ChunkPos arg0)
method_38783(class_1923 arg0)
shouldTick(ChunkPos pos)
private boolean
l(dfp arg0)
anyPlayerCloseEnoughForSpawningInternal(ChunkPos arg0)
method_61261(class_1923 arg0)
isAnyPlayerTicking(ChunkPos pos)
public List<ServerPlayer>
c(dfp arg0)
getPlayersCloseForSpawning(ChunkPos arg0)
method_37907(class_1923 arg0)
getPlayersWatchingChunk(ChunkPos pos)
private boolean
c(are arg0, dfp arg1)
playerIsCloseEnoughForSpawning(ServerPlayer arg0, ChunkPos arg1)
method_38782(class_3222 arg0, class_1923 arg1)
canTickChunk(ServerPlayerEntity player, ChunkPos pos)
private boolean
c(are arg0)
skipPlayer(ServerPlayer arg0)
method_18722(class_3222 arg0)
doesNotGenerateChunks(ServerPlayerEntity player)
void
a(are arg0, boolean arg1)
updatePlayerStatus(ServerPlayer arg0, boolean arg1)
method_18714(class_3222 arg0, boolean arg1)
handlePlayerAddedOrRemoved(ServerPlayerEntity player, boolean added)
private void
d(are arg0)
updatePlayerPos(ServerPlayer arg0)
method_20726(class_3222 arg0)
updateWatchedSection(ServerPlayerEntity player)
public void
a(are arg0)
move(ServerPlayer arg0)
method_18713(class_3222 arg0)
updatePosition(ServerPlayerEntity player)
private void
e(are arg0)
updateChunkTracking(ServerPlayer arg0)
method_17241(class_3222 arg0)
sendWatchPackets(ServerPlayerEntity player)
private void
a(are arg0, aqn arg1)
applyChunkTrackingView(ServerPlayer arg0, ChunkTrackingView arg1)
method_52346(class_3222 arg0, class_8603 arg1)
sendWatchPackets(ServerPlayerEntity player, ChunkFilter chunkFilter)
public List<ServerPlayer>
a(dfp arg0, boolean arg1)
getPlayers(ChunkPos arg0, boolean arg1)
method_17210(class_1923 arg0, boolean arg1)
getPlayersWatchingChunk(ChunkPos arg0, boolean arg1)
protected void
a(bum arg0)
addEntity(Entity arg0)
method_18701(class_1297 arg0)
loadEntity(Entity entity)
protected void
b(bum arg0)
removeEntity(Entity arg0)
method_18716(class_1297 arg0)
unloadEntity(Entity entity)
protected void
l()
tick()
method_18727()
tickEntityMovement()
public void
a(bum arg0, yw<?> arg1)
broadcast(Entity arg0, Packet<?> arg1)
method_18702(class_1297 arg0, class_2596<?> arg1)
sendToOtherNearbyPlayers(Entity entity, Packet<?> packet)
protected void
b(bum arg0, yw<?> arg1)
broadcastAndSend(Entity arg0, Packet<?> arg1)
method_18717(class_1297 arg0, class_2596<?> arg1)
sendToNearbyPlayers(Entity entity, Packet<?> packet)
public void
a(List<dyt> arg0)
resendBiomesForChunks(List<ChunkAccess> arg0)
method_49421(List<class_2791> arg0)
sendChunkBiomePackets(List<Chunk> chunks)
protected PoiManager
m()
getPoiManager()
method_19488()
getPointOfInterestStorage()
public String
n()
getStorageName()
method_37476()
getSaveDir()
void
a(dfp arg0, aqs arg1)
onFullChunkStatusChange(ChunkPos arg0, FullChunkStatus arg1)
method_31414(class_1923 arg0, class_3194 arg1)
onChunkStatusChange(ChunkPos chunkPos, ChunkLevelType levelType)
public void
a(dfp arg0, int arg1)
waitForLightBeforeSending(ChunkPos arg0, int arg1)
method_53685(class_1923 arg0, int arg1)
forceLighting(ChunkPos centerPos, int radius)