net.minecraft.server.world

public class ServerChunkManager

extends ChunkManager

All mapped superinterfaces:

ChunkProvider

net.minecraft.server.level.ServerChunkCache
net.minecraft.class_3215
net.minecraft.server.world.ServerChunkManager

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
LOGGER
field_52354
LOGGER
private final ChunkLevelManager
distanceManager
field_17252
levelManager
private final ServerWorld
level
field_13945
world
private final Thread
mainThread
field_17253
serverThread
private final ServerLightingProvider
lightEngine
field_13921
lightingProvider
private final ServerChunkManager$MainThreadExecutor
mainThreadProcessor
field_18809
mainThreadExecutor
public final ServerChunkLoadingManager
chunkMap
field_17254
chunkLoadingManager
private final PersistentStateManager
savedDataStorage
field_17708
persistentStateManager
private final ChunkTicketManager
ticketStorage
field_55594
ticketManager
private long
lastInhabitedUpdate
field_13928
lastTickTime
private boolean
spawnEnemies
field_13929
spawnMonsters
private static final int
CACHE_SIZE
field_29766
CACHE_SIZE
private final long[]
lastChunkPos
field_19335
chunkPosCache
private final ChunkStatus[]
lastChunkStatus
field_19336
chunkStatusCache
private final Chunk[]
lastChunk
field_19337
chunkCache
private final List<WorldChunk>
spawningChunks
field_56524
spawningChunks
private final Set<ChunkHolder>
chunkHoldersToBroadcast
field_52356
chunksToBroadcastUpdate
private SpawnHelper$Info
lastSpawnState
field_24455
spawnInfo

Constructor summary

ModifierConstructor
public (ServerWorld world, LevelStorage$Session session, com.mojang.datafixers.DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkStatusChangeListener chunkStatusListener, Supplier<PersistentStateManager> overworldDataStorage)

Method summary

Modifier and TypeMethod
public ServerLightingProvider
getLightEngine()
method_12130()
getLightingProvider()
private ChunkHolder
getVisibleChunkIfPresent(long key)
method_14131(long arg0)
getChunkHolder(long pos)
private void
storeInCache(long pos, ChunkAccess chunk, ChunkStatus status)
method_21738(long arg0, class_2791 arg1, class_2806 arg2)
putInCache(long pos, Chunk chunk, ChunkStatus status)
public Chunk
getChunk(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate)
method_12121(int arg0, int arg1, class_2806 arg2, boolean arg3)
getChunk(int arg0, int arg1, ChunkStatus arg2, boolean arg3)
public WorldChunk
getChunkNow(int x, int z)
method_21730(int arg0, int arg1)
getWorldChunk(int arg0, int arg1)
private void
clearCache()
method_20587()
initChunkCaches()
public CompletableFuture<OptionalChunk<Chunk>>
getChunkFuture(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate)
method_17299(int arg0, int arg1, class_2806 arg2, boolean arg3)
getChunkFutureSyncOnMainThread(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create)
private CompletableFuture<OptionalChunk<Chunk>>
getChunkFutureMainThread(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate)
method_14134(int arg0, int arg1, class_2806 arg2, boolean arg3)
getChunkFuture(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create)
private boolean
chunkAbsent(ChunkHolder chunkHolder, int targetTicketLevel)
method_18752(class_3193 arg0, int arg1)
isMissingForLevel(ChunkHolder holder, int maxLevel)
public boolean
hasChunk(int x, int z)
method_12123(int arg0, int arg1)
isChunkLoaded(int arg0, int arg1)
public LightSourceView
getChunkForLighting(int x, int z)
method_12246(int arg0, int arg1)
getChunk(int arg0, int arg1)
public World
getLevel()
method_16399()
getWorld()
public boolean
pollTask()
method_19492()
executeQueuedTasks()
boolean
runDistanceManagerUpdates()
method_16155()
updateChunks()
public boolean
isPositionTicking(long chunkKey)
method_37114(long arg0)
isTickingFutureReady(long pos)
public void
save(boolean flushStorage)
method_17298(boolean arg0)
save(boolean flush)
public void
close()
public void
tick(BooleanSupplier haveTime, boolean tickChunks)
method_12127(BooleanSupplier arg0, boolean arg1)
tick(BooleanSupplier arg0, boolean arg1)
private void
tickChunks()
method_14161()
tickChunks()
private void
broadcastChangedChunks(ProfilerFiller profiler)
method_61264(class_3695 arg0)
broadcastUpdates(Profiler profiler)
private void
tickChunks(ProfilerFiller profiler, long timeDiff)
method_61265(class_3695 arg0, long arg1)
tickChunks(Profiler profiler, long timeDelta)
private void
tickSpawningChunk(LevelChunk chunk, long timeDiff, List<MobCategory> spawningCategories, NaturalSpawner$SpawnState spawnCookie)
method_67502(class_2818 arg0, long arg1, List<class_1311> arg2, class_1948$class_5262 arg3)
tickSpawningChunk(WorldChunk chunk, long timeDelta, List<SpawnGroup> spawnableGroups, SpawnHelper$Info info)
private void
getFullChunk(long chunkKey, Consumer<LevelChunk> output)
method_27907(long arg0, Consumer<class_2818> arg1)
ifChunkLoaded(long pos, Consumer<WorldChunk> chunkConsumer)
public String
gatherStats()
method_12122()
getDebugString()
public int
getPendingTasksCount()
method_21694()
getPendingTasks()
public ChunkGenerator
getGenerator()
method_12129()
getChunkGenerator()
public StructurePlacementCalculator
getGeneratorState()
method_46642()
getStructurePlacementCalculator()
public NoiseConfig
randomState()
method_41248()
getNoiseConfig()
public int
getLoadedChunksCount()
method_14151()
getLoadedChunkCount()
public void
blockChanged(BlockPos pos)
method_14128(class_2338 arg0)
markForUpdate(BlockPos pos)
public void
onLightUpdate(LightLayer layer, SectionPos pos)
method_12247(class_1944 arg0, class_4076 arg1)
onLightUpdate(LightType arg0, ChunkSectionPos arg1)
public boolean
hasActiveTickets()
method_72269()
shouldResetIdleTimeout()
public void
addTicket(Ticket ticket, ChunkPos pos)
method_66008(class_3228 arg0, class_1923 arg1)
addTicket(ChunkTicket ticket, ChunkPos pos)
public CompletableFuture<?>
addTicketAndLoadWithRadius(TicketType type, ChunkPos pos, int radius)
method_72267(class_3230 arg0, class_1923 arg1, int arg2)
addChunkLoadingTicket(ChunkTicketType ticketType, ChunkPos pos, int radius)
public void
addTicketWithRadius(TicketType type, ChunkPos pos, int radius)
method_66009(class_3230 arg0, class_1923 arg1, int arg2)
addTicket(ChunkTicketType type, ChunkPos pos, int radius)
public void
removeTicketWithRadius(TicketType type, ChunkPos pos, int radius)
method_66010(class_3230 arg0, class_1923 arg1, int arg2)
removeTicket(ChunkTicketType type, ChunkPos pos, int radius)
public boolean
updateChunkForced(ChunkPos pos, boolean forced)
method_12124(class_1923 arg0, boolean arg1)
setChunkForced(ChunkPos arg0, boolean arg1)
public it.unimi.dsi.fastutil.longs.LongSet
getForceLoadedChunks()
method_66011()
getForcedChunks()
public void
move(ServerPlayer player)
method_14096(class_3222 arg0)
updatePosition(ServerPlayerEntity player)
public void
removeEntity(Entity entity)
method_18753(class_1297 arg0)
unloadEntity(Entity entity)
public void
addEntity(Entity entity)
method_18755(class_1297 arg0)
loadEntity(Entity entity)
public void
sendToTrackingPlayersAndSelf(Entity entity, Packet<? super ClientGamePacketListener> packet)
method_18751(class_1297 arg0, class_2596<? super class_2602> arg1)
sendToNearbyPlayers(Entity entity, Packet<? super ClientPlayPacketListener> packet)
public void
sendToTrackingPlayers(Entity entity, Packet<? super ClientGamePacketListener> packet)
method_18754(class_1297 arg0, class_2596<? super class_2602> arg1)
sendToOtherNearbyPlayers(Entity entity, Packet<? super ClientPlayPacketListener> packet)
public void
setViewDistance(int newDistance)
method_14144(int arg0)
applyViewDistance(int watchDistance)
public void
setSimulationDistance(int simulationDistance)
method_38634(int arg0)
applySimulationDistance(int simulationDistance)
public void
setSpawnSettings(boolean spawnEnemies)
method_12128(boolean arg0)
setMobSpawnOptions(boolean arg0)
public String
getChunkDebugData(ChunkPos pos)
method_23273(class_1923 arg0)
getChunkLoadingDebugInfo(ChunkPos pos)
public PersistentStateManager
getDataStorage()
method_17981()
getPersistentStateManager()
public PointOfInterestStorage
getPoiManager()
method_19493()
getPointOfInterestStorage()
public NbtScannable
chunkScanner()
method_39777()
getChunkIoWorker()
public SpawnHelper$Info
getLastSpawnState()
method_27908()
getSpawnInfo()
public void
deactivateTicketsOnClosing()
method_66012()
shutdown()
public void
onChunkReadyToSend(ChunkHolder chunk)
method_65078(class_3193 arg0)
markForUpdate(ChunkHolder chunkHolder)
public LightingProvider
getLightEngine()
method_12130()
getLightingProvider()
public BlockView
getLevel()
method_16399()
getWorld()
private static ChunkStatus
lambda$addTicketAndLoadWithRadius$0(int arg0)
method_72268(int arg0)
method_72268(int distance)
private void
lambda$onLightUpdate$0(SectionPos arg0, LightLayer arg1)
method_14118(class_4076 arg0, class_1944 arg1)
method_14118(ChunkSectionPos arg0, LightType arg1)
private void
lambda$tickChunks$0(int arg0, LevelChunk arg1)
method_67501(int arg0, class_2818 arg1)
method_67501(int arg0, WorldChunk chunk)
private static CompletionStage
lambda$getChunkFuture$1(CompletableFuture arg0)
method_14159(CompletableFuture arg0)
method_14159(CompletableFuture future)
private CompletableFuture
lambda$getChunkFuture$0(int arg0, int arg1, ChunkStatus arg2, boolean arg3)
method_14098(int arg0, int arg1, class_2806 arg2, boolean arg3)
method_14098(int arg0, int arg1, ChunkStatus arg2, boolean arg3)
private Chunk
lambda$getChunk$0(int arg0, int arg1, ChunkStatus arg2, boolean arg3)
method_20586(int arg0, int arg1, class_2806 arg2, boolean arg3)
method_20586(int arg0, int arg1, ChunkStatus arg2, boolean arg3)