类 ServerChunkCache
java.lang.Object
net.minecraft.world.level.chunk.ChunkSource
net.minecraft.server.level.ServerChunkCache
- 所有已实现的接口:
AutoCloseable
,LightChunkGetter
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static final record
(专用程序包) final class
-
字段概要
字段修饰符和类型字段说明private static final int
private final Set
<ChunkHolder> final ChunkMap
private final DimensionDataStorage
private final DistanceManager
private final ChunkAccess[]
private final long[]
private final ChunkStatus[]
private long
private NaturalSpawner.SpawnState
final ServerLevel
(专用程序包) final ThreadedLevelLightEngine
private static final org.slf4j.Logger
(专用程序包) final Thread
private final ServerChunkCache.MainThreadExecutor
private boolean
private boolean
private final List
<LevelChunk> -
构造器概要
构造器构造器说明ServerChunkCache
(ServerLevel p_214982_, LevelStorageSource.LevelStorageAccess p_214983_, com.mojang.datafixers.DataFixer p_214984_, StructureTemplateManager p_214985_, Executor p_214986_, ChunkGenerator p_214987_, int p_214988_, int p_214989_, boolean p_214990_, ChunkProgressListener p_214991_, ChunkStatusUpdateListener p_214992_, Supplier<DimensionDataStorage> p_214993_) -
方法概要
修饰符和类型方法说明void
<T> void
addRegionTicket
(TicketType<T> p_8388_, ChunkPos p_8389_, int p_8390_, T p_8391_) <T> void
addRegionTicket
(TicketType<T> p_8388_, ChunkPos p_8389_, int p_8390_, T p_8391_, boolean forceTicks) void
blockChanged
(BlockPos p_8451_) void
void
broadcastAndSend
(Entity p_8395_, Packet<?> p_8396_) private void
broadcastChangedChunks
(ProfilerFiller p_369706_) private boolean
chunkAbsent
(ChunkHolder p_8417_, int p_8418_) private void
void
close()
private void
collectTickingChunks
(List<LevelChunk> p_368970_) getChunk
(int p_8360_, int p_8361_, ChunkStatus p_334940_, boolean p_8363_) private Consumer
<ChunkHolder> getChunkCollector
(Collection<LevelChunk> p_368970_, Predicate<LevelChunk> predicate) FORGE: Isolate chunk collection callbackgetChunkDebugData
(ChunkPos p_8449_) getChunkForLighting
(int p_8454_, int p_8455_) getChunkFuture
(int p_8432_, int p_8433_, ChunkStatus p_329681_, boolean p_8435_) private CompletableFuture
<ChunkResult<ChunkAccess>> getChunkFutureMainThread
(int p_8457_, int p_8458_, ChunkStatus p_334479_, boolean p_8460_) getChunkNow
(int p_8357_, int p_8358_) private void
getFullChunk
(long p_8371_, Consumer<LevelChunk> p_8372_) getLevel()
int
int
int
private ChunkHolder
getVisibleChunkIfPresent
(long p_8365_) boolean
hasChunk
(int p_8429_, int p_8430_) boolean
isPositionTicking
(long p_143240_) void
move
(ServerPlayer p_8386_) void
onChunkReadyToSend
(ChunkHolder p_370261_) void
onLightUpdate
(LightLayer p_8403_, SectionPos p_8404_) boolean
pollTask()
void
removeEntity
(Entity p_8444_) <T> void
removeRegionTicket
(TicketType<T> p_8439_, ChunkPos p_8440_, int p_8441_, T p_8442_) <T> void
removeRegionTicket
(TicketType<T> p_8439_, ChunkPos p_8440_, int p_8441_, T p_8442_, boolean forceTicks) void
(专用程序包) boolean
void
save
(boolean p_8420_) void
setSimulationDistance
(int p_184027_) void
setSpawnSettings
(boolean p_8425_) void
setViewDistance
(int p_8355_) private void
storeInCache
(long p_8367_, ChunkAccess p_8368_, ChunkStatus p_333650_) void
tick
(BooleanSupplier p_201913_, boolean p_201914_) private void
private void
tickChunks
(ProfilerFiller p_368327_, long p_362313_, List<LevelChunk> p_366274_) void
updateChunkForced
(ChunkPos p_8400_, boolean p_8401_) 从类继承的方法 net.minecraft.world.level.chunk.ChunkSource
getChunk, onSectionEmptinessChanged
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
distanceManager
-
level
-
mainThread
-
lightEngine
-
mainThreadProcessor
-
chunkMap
-
dataStorage
-
lastInhabitedUpdate
private long lastInhabitedUpdate -
spawnEnemies
private boolean spawnEnemies -
spawnFriendlies
private boolean spawnFriendlies -
CACHE_SIZE
private static final int CACHE_SIZE- 另请参阅:
-
lastChunkPos
private final long[] lastChunkPos -
lastChunkStatus
-
lastChunk
-
tickingChunks
-
chunkHoldersToBroadcast
-
lastSpawnState
-
-
构造器详细资料
-
ServerChunkCache
public ServerChunkCache(ServerLevel p_214982_, LevelStorageSource.LevelStorageAccess p_214983_, com.mojang.datafixers.DataFixer p_214984_, StructureTemplateManager p_214985_, Executor p_214986_, ChunkGenerator p_214987_, int p_214988_, int p_214989_, boolean p_214990_, ChunkProgressListener p_214991_, ChunkStatusUpdateListener p_214992_, Supplier<DimensionDataStorage> p_214993_)
-
-
方法详细资料
-
getLightEngine
- 指定者:
getLightEngine
在类中ChunkSource
-
getVisibleChunkIfPresent
-
getTickingGenerated
public int getTickingGenerated() -
storeInCache
-
getChunk
@Nullable public ChunkAccess getChunk(int p_8360_, int p_8361_, ChunkStatus p_334940_, boolean p_8363_) - 指定者:
getChunk
在类中ChunkSource
-
getChunkNow
- 覆盖:
getChunkNow
在类中ChunkSource
-
clearCache
private void clearCache() -
getChunkFuture
public CompletableFuture<ChunkResult<ChunkAccess>> getChunkFuture(int p_8432_, int p_8433_, ChunkStatus p_329681_, boolean p_8435_) -
getChunkFutureMainThread
private CompletableFuture<ChunkResult<ChunkAccess>> getChunkFutureMainThread(int p_8457_, int p_8458_, ChunkStatus p_334479_, boolean p_8460_) -
chunkAbsent
-
hasChunk
public boolean hasChunk(int p_8429_, int p_8430_) - 覆盖:
hasChunk
在类中ChunkSource
-
getChunkForLighting
- 指定者:
getChunkForLighting
在接口中LightChunkGetter
- 覆盖:
getChunkForLighting
在类中ChunkSource
-
getLevel
-
pollTask
public boolean pollTask() -
runDistanceManagerUpdates
boolean runDistanceManagerUpdates() -
isPositionTicking
public boolean isPositionTicking(long p_143240_) -
save
public void save(boolean p_8420_) -
close
- 指定者:
close
在接口中AutoCloseable
- 覆盖:
close
在类中ChunkSource
- 抛出:
IOException
-
tick
- 指定者:
tick
在类中ChunkSource
-
tickChunks
private void tickChunks() -
broadcastChangedChunks
-
collectTickingChunks
-
getChunkCollector
private Consumer<ChunkHolder> getChunkCollector(Collection<LevelChunk> p_368970_, Predicate<LevelChunk> predicate) FORGE: Isolate chunk collection callback -
tickChunks
-
getFullChunk
-
gatherStats
- 指定者:
gatherStats
在类中ChunkSource
-
getPendingTasksCount
public int getPendingTasksCount() -
getGenerator
-
getGeneratorState
-
randomState
-
getLoadedChunksCount
public int getLoadedChunksCount()- 指定者:
getLoadedChunksCount
在类中ChunkSource
-
blockChanged
-
onLightUpdate
-
addRegionTicket
-
addRegionTicket
public <T> void addRegionTicket(TicketType<T> p_8388_, ChunkPos p_8389_, int p_8390_, T p_8391_, boolean forceTicks) -
removeRegionTicket
-
removeRegionTicket
public <T> void removeRegionTicket(TicketType<T> p_8439_, ChunkPos p_8440_, int p_8441_, T p_8442_, boolean forceTicks) -
updateChunkForced
- 覆盖:
updateChunkForced
在类中ChunkSource
-
move
-
removeEntity
-
addEntity
-
broadcastAndSend
-
broadcast
-
setViewDistance
public void setViewDistance(int p_8355_) -
setSimulationDistance
public void setSimulationDistance(int p_184027_) -
setSpawnSettings
public void setSpawnSettings(boolean p_8425_) - 覆盖:
setSpawnSettings
在类中ChunkSource
-
getChunkDebugData
-
getDataStorage
-
getPoiManager
-
chunkScanner
-
getLastSpawnState
-
removeTicketsOnClosing
public void removeTicketsOnClosing() -
onChunkReadyToSend
-