net.minecraft.server.level

public class ChunkMap

extends ChunkStorage implements ChunkHolder$PlayerProvider

All mapped superinterfaces:

ChunkHolder$PlayerProvider

acv
net.minecraft.server.level.ChunkMap
net.minecraft.class_3898
net.minecraft.server.world.ThreadedAnvilChunkStorage
net.minecraft.src.C_5429_
net.minecraft.server.level.PlayerChunkMap

Field summary

Modifier and TypeField
private static final byte
f
CHUNK_TYPE_REPLACEABLE
field_29671
PROTO_CHUNK
f_143034_
private static final byte
g
CHUNK_TYPE_UNKNOWN
field_29672
UNMARKED_CHUNK
f_143035_
private static final byte
h
CHUNK_TYPE_FULL
field_29673
LEVEL_CHUNK
f_143036_
private static final org.apache.logging.log4j.Logger
i
LOGGER
field_17212
LOGGER
f_140128_
private static final int
j
CHUNK_SAVED_PER_TICK
field_29674
field_29674
f_143037_
private static final int
k
CHUNK_SAVED_EAGERLY_PER_TICK
field_36291
field_36291
f_198789_
private static final int
l
MIN_VIEW_DISTANCE
field_29675
field_29675
f_143038_
public static final int
a
MAX_VIEW_DISTANCE
field_29669
field_29669
f_143032_
public static final int
b
MAX_CHUNK_DISTANCE
field_18239
MAX_LEVEL
f_140127_
public static final int
c
FORCED_TICKET_LEVEL
field_29670
field_29670
f_143033_
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
m
updatingChunkMap
field_17213
currentChunkHolders
f_140129_
private volatile it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
n
visibleChunkMap
field_17220
chunkHolders
f_140130_
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
o
pendingUnloads
field_18807
chunksToUnload
f_140131_
private final it.unimi.dsi.fastutil.longs.LongSet
p
entitiesInLevel
field_18307
loadedChunks
f_140132_
final ServerLevel
q
level
field_17214
world
f_140133_
private final ThreadedLevelLightEngine
r
lightEngine
field_17215
lightingProvider
f_140134_
private final BlockableEventLoop<Runnable>
s
mainThreadExecutor
field_17216
mainThreadExecutor
f_140135_
private ChunkGenerator
t
generator
field_17218
chunkGenerator
f_140136_
private final Supplier<DimensionDataStorage>
u
overworldDataStorage
field_17705
persistentStateManagerFactory
f_140137_
private final PoiManager
v
poiManager
field_18808
pointOfInterestStorage
f_140138_
final it.unimi.dsi.fastutil.longs.LongSet
w
toDrop
field_17221
unloadedChunks
f_140139_
private boolean
x
modified
field_17222
chunkHolderListDirty
f_140140_
private final ChunkTaskPriorityQueueSorter
y
queueSorter
field_17223
chunkTaskPrioritySystem
f_140141_
private final ProcessorHandle<ChunkTaskPriorityQueueSorter$Message<Runnable>>
z
worldgenMailbox
field_17224
worldGenExecutor
f_140142_
private final ProcessorHandle<ChunkTaskPriorityQueueSorter$Message<Runnable>>
A
mainThreadMailbox
field_17226
mainExecutor
f_140143_
private final ChunkProgressListener
B
progressListener
field_17442
worldGenerationProgressListener
f_140144_
private final ChunkStatusUpdateListener
C
chunkStatusListener
field_26931
chunkStatusChangeListener
f_143031_
private final ChunkMap$DistanceManager
D
distanceManager
field_17228
ticketManager
f_140145_
private final AtomicInteger
E
tickingGenerated
field_17230
totalChunksLoadedCount
f_140146_
private final StructureManager
F
structureManager
field_17706
structureManager
f_140147_
private final String
G
storageName
field_17707
saveDir
f_182284_
private final PlayerMap
H
playerMap
field_18241
playerChunkWatchingManager
f_140149_
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChunkMap$TrackedEntity>
I
entityMap
field_18242
entityTrackers
f_140150_
private final it.unimi.dsi.fastutil.longs.Long2ByteMap
J
chunkTypeCache
field_23786
chunkToType
f_140151_
private final Queue<Runnable>
K
unloadQueue
field_19343
unloadTaskQueue
f_140125_
int
L
viewDistance
field_18243
watchDistance
f_140126_

Constructor summary

ModifierConstructor
public (ServerLevel world, LevelStorageSource$LevelStorageAccess session, com.mojang.datafixers.DataFixer dataFixer, StructureManager structureManager, 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_()
public void
b()
debugReloadGenerator()
method_37904()
verifyChunkGenerator()
m_183825_()
private static double
a(bzk arg0, awt 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_)
public static boolean
a(int arg0, int arg1, int arg2, int arg3, int arg4)
isChunkInRange(int arg0, int arg1, int arg2, int arg3, int arg4)
method_39975(int arg0, int arg1, int arg2, int arg3, int arg4)
isWithinDistance(int x1, int z1, int x2, int z2, int distance)
m_200878_(int p_200879_, int p_200880_, int p_200881_, int p_200882_, int p_200883_)
private static boolean
b(int arg0, int arg1, int arg2, int arg3, int arg4)
isChunkOnRangeBorder(int arg0, int arg1, int arg2, int arg3, int arg4)
method_39976(int arg0, int arg1, int arg2, int arg3, int arg4)
isOnDistanceEdge(int x1, int z1, int x2, int z2, int distance)
m_183828_(int p_183829_, int p_183830_, int p_183831_, int p_183832_, int p_183833_)
protected ThreadedLevelLightEngine
c()
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(bzk arg0)
getChunkDebugData(ChunkPos arg0)
method_23272(class_1923 arg0)
getChunkLoadingDebugInfo(ChunkPos chunkPos)
m_140204_(C_1560_ arg0)
private CompletableFuture<com.mojang.datafixers.util.Either<List<ChunkAccess>, ChunkHolder$ChunkLoadingFailure>>
a(bzk arg0, int arg1, IntFunction<cqb> arg2)
getChunkRangeFuture(ChunkPos arg0, int arg1, IntFunction<ChunkStatus> arg2)
method_17220(class_1923 arg0, int arg1, IntFunction<class_2806> arg2)
getRegion(ChunkPos centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus)
m_140210_(C_1560_ p_140212_, int p_140213_, IntFunction<C_2126_> arg2)
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder$ChunkLoadingFailure>>
b(bzk arg0)
prepareEntityTickingChunk(ChunkPos arg0)
method_17247(class_1923 arg0)
makeChunkEntitiesTickable(ChunkPos pos)
m_143117_(C_1560_ arg0)
ChunkHolder
a(long arg0, int arg1, acu 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)
private void
b(BooleanSupplier arg0)
processUnloads(BooleanSupplier arg0)
method_20605(BooleanSupplier arg0)
unloadChunks(BooleanSupplier shouldKeepTicking)
m_140353_(BooleanSupplier arg0)
private void
a(long arg0, acu 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
d()
promoteChunkMap()
method_17244()
updateHolderMap()
m_140324_()
public CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder$ChunkLoadingFailure>>
a(acu arg0, cqb arg1)
schedule(ChunkHolder arg0, ChunkStatus arg1)
method_17236(class_3193 arg0, class_2806 arg1)
getChunk(ChunkHolder holder, ChunkStatus requiredStatus)
m_140292_(C_5422_ p_140294_, C_2126_ arg1)
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder$ChunkLoadingFailure>>
g(bzk arg0)
scheduleChunkLoad(ChunkPos arg0)
method_20619(class_1923 arg0)
loadChunk(ChunkPos pos)
m_140417_(C_1560_ arg0)
private void
h(bzk arg0)
markPositionReplaceable(ChunkPos arg0)
method_27054(class_1923 arg0)
markAsProtoChunk(ChunkPos pos)
m_140422_(C_1560_ arg0)
private byte
a(bzk arg0, cqb$a arg1)
markPosition(ChunkPos arg0, ChunkStatus$ChunkType arg1)
method_27053(class_1923 arg0, class_2806$class_2808 arg1)
mark(ChunkPos pos, ChunkStatus$ChunkType type)
m_140229_(C_1560_ p_140231_, C_2126_$C_2127_ arg1)
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder$ChunkLoadingFailure>>
b(acu arg0, cqb arg1)
scheduleChunkGeneration(ChunkHolder arg0, ChunkStatus arg1)
method_20617(class_3193 arg0, class_2806 arg1)
upgradeChunk(ChunkHolder holder, ChunkStatus requiredStatus)
m_140360_(C_5422_ p_140362_, C_2126_ arg1)
protected void
c(bzk arg0)
releaseLightTicket(ChunkPos arg0)
method_20441(class_1923 arg0)
releaseLightTicket(ChunkPos pos)
m_140375_(C_1560_ arg0)
private ChunkStatus
a(cqb arg0, int arg1)
getDependencyStatus(ChunkStatus arg0, int arg1)
method_17229(class_2806 arg0, int arg1)
getRequiredStatusForGeneration(ChunkStatus centerChunkTargetStatus, int distance)
m_140262_(C_2126_ p_140264_, int arg1)
private static void
a(adi arg0, List<oc> arg1)
postLoadProtoChunk(ServerLevel arg0, List<CompoundTag> arg1)
method_31413(class_3218 arg0, List<class_2487> arg1)
addEntitiesFromNbt(ServerWorld world, List<NbtCompound> nbt)
m_143064_(C_12_ p_143065_, List<C_4917_> p_143066_)
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder$ChunkLoadingFailure>>
c(acu arg0)
protoChunkToFullChunk(ChunkHolder arg0)
method_17226(class_3193 arg0)
convertToFullChunk(ChunkHolder chunkHolder)
m_140383_(C_5422_ arg0)
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder$ChunkLoadingFailure>>
a(acu arg0)
prepareTickingChunk(ChunkHolder arg0)
method_17235(class_3193 arg0)
makeChunkTickable(ChunkHolder holder)
m_143053_(C_5422_ arg0)
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder$ChunkLoadingFailure>>
b(acu arg0)
prepareAccessibleChunk(ChunkHolder arg0)
method_31417(class_3193 arg0)
makeChunkAccessible(ChunkHolder holder)
m_143109_(C_5422_ arg0)
public int
e()
getTickingGenerated()
method_17253()
getTotalChunksLoadedCount()
m_140368_()
private boolean
d(acu arg0)
saveChunkIfNeeded(ChunkHolder arg0)
method_39925(class_3193 arg0)
save(ChunkHolder chunkHolder)
m_198874_(C_5422_ arg0)
private boolean
a(cpy arg0)
save(ChunkAccess arg0)
method_17228(class_2791 arg0)
save(Chunk chunk)
m_140258_(C_2116_ arg0)
private boolean
i(bzk arg0)
isExistingChunkFull(ChunkPos arg0)
method_27055(class_1923 arg0)
isLevelChunk(ChunkPos pos)
m_140425_(C_1560_ arg0)
protected void
a(int arg0)
setViewDistance(int arg0)
method_17214(int arg0)
setViewDistance(int watchDistance)
m_140167_(int arg0)
protected void
a(adj arg0, bzk arg1, org.apache.commons.lang3.mutable.MutableObject<se> arg2, boolean arg3, boolean arg4)
updateChunkTracking(ServerPlayer arg0, ChunkPos arg1, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> arg2, boolean arg3, boolean arg4)
method_17241(class_3222 arg0, class_1923 arg1, org.apache.commons.lang3.mutable.MutableObject<class_2672> arg2, boolean arg3, boolean arg4)
sendWatchPackets(ServerPlayerEntity player, ChunkPos pos, org.apache.commons.lang3.mutable.MutableObject<ChunkDataS2CPacket> packet, boolean oldWithinViewDistance, boolean newWithinViewDistance)
m_183754_(C_13_ p_183756_, C_1560_ p_183757_, org.apache.commons.lang3.mutable.MutableObject<C_183120_> p_183758_, boolean p_183759_, boolean arg4)
public int
f()
size()
method_17260()
getLoadedChunkCount()
m_140394_()
public DistanceManager
g()
getDistanceManager()
method_17263()
getTicketManager()
m_143145_()
protected Iterable<ChunkHolder>
h()
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<com.mojang.datafixers.util.Either<cqi, acu$a>> arg0)
printFuture(CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder$ChunkLoadingFailure>> arg0)
method_21676(CompletableFuture<com.mojang.datafixers.util.Either<class_2818, class_3193$class_3724>> arg0)
getFutureStatus(CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk, ChunkHolder$Unloaded>> future)
m_140278_(CompletableFuture<com.mojang.datafixers.util.Either<C_2137_, C_5422_$C_5424_>> p_140279_)
private CompoundTag
j(bzk arg0)
readChunk(ChunkPos arg0)
method_17979(class_1923 arg0)
getUpdatedChunkNbt(ChunkPos pos)
m_140427_(C_1560_ arg0)
boolean
d(bzk arg0)
anyPlayerCloseEnoughForSpawning(ChunkPos arg0)
method_38783(class_1923 arg0)
shouldTick(ChunkPos pos)
m_183879_(C_1560_ arg0)
public List<ServerPlayer>
e(bzk arg0)
getPlayersCloseForSpawning(ChunkPos arg0)
method_37907(class_1923 arg0)
getPlayersWatchingChunk(ChunkPos pos)
m_183888_(C_1560_ arg0)
private boolean
a(adj arg0, bzk 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
b(adj arg0)
skipPlayer(ServerPlayer arg0)
method_18722(class_3222 arg0)
doesNotGenerateChunks(ServerPlayerEntity player)
m_140329_(C_13_ arg0)
void
a(adj 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 SectionPos
c(adj arg0)
updatePlayerPos(ServerPlayer arg0)
method_20726(class_3222 arg0)
updateWatchedSection(ServerPlayerEntity player)
m_140373_(C_13_ arg0)
public void
a(adj arg0)
move(ServerPlayer arg0)
method_18713(class_3222 arg0)
updatePosition(ServerPlayerEntity player)
m_140184_(C_13_ arg0)
public List<ServerPlayer>
a(bzk 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(awt arg0)
addEntity(Entity arg0)
method_18701(class_1297 arg0)
loadEntity(Entity entity)
m_140199_(C_507_ arg0)
protected void
b(awt arg0)
removeEntity(Entity arg0)
method_18716(class_1297 arg0)
unloadEntity(Entity entity)
m_140331_(C_507_ arg0)
protected void
i()
tick()
method_18727()
tickEntityMovement()
m_140421_()
public void
a(awt arg0, qr<?> 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(awt arg0, qr<?> 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)
private void
a(adj arg0, org.apache.commons.lang3.mutable.MutableObject<se> arg1, cqi arg2)
playerLoadedChunk(ServerPlayer arg0, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> arg1, LevelChunk arg2)
method_18715(class_3222 arg0, org.apache.commons.lang3.mutable.MutableObject<class_2672> arg1, class_2818 arg2)
sendChunkDataPackets(ServerPlayerEntity player, org.apache.commons.lang3.mutable.MutableObject<ChunkDataS2CPacket> cachedDataPacket, WorldChunk chunk)
m_183760_(C_13_ p_183762_, org.apache.commons.lang3.mutable.MutableObject<C_183120_> p_183763_, C_2137_ arg2)
protected PoiManager
j()
getPoiManager()
method_19488()
getPointOfInterestStorage()
m_140424_()
public String
k()
getStorageName()
method_37476()
getSaveDir()
m_182285_()
void
a(bzk arg0, acu$c arg1)
onFullChunkStatusChange(ChunkPos arg0, ChunkHolder$FullChunkStatus arg1)
method_31414(class_1923 arg0, class_3193$class_3194 arg1)
onChunkStatusChange(ChunkPos chunkPos, ChunkHolder$LevelType levelType)
m_143075_(C_1560_ p_143077_, C_5422_$C_5426_ arg1)