类 ServerChunkCache
java.lang.Object
net.minecraft.world.level.chunk.ChunkSource
net.minecraft.server.level.ServerChunkCache
- 所有已实现的接口:
AutoCloseable
,LightChunkGetter
,IServerChunkCacheExtension
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明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> private final TicketStorage
-
构造器概要
构造器构造器说明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
void
void
addTicketWithRadius
(TicketType p_394166_, ChunkPos p_394235_, int p_393501_) void
blockChanged
(BlockPos p_8451_) void
void
broadcastAndSend
(Entity p_8395_, Packet<?> p_8396_) private void
broadcastChangedChunks
(ProfilerFiller p_360525_) private boolean
chunkAbsent
(ChunkHolder p_8417_, int p_8418_) private void
void
close()
void
getChunk
(int p_8360_, int p_8361_, ChunkStatus p_330876_, boolean p_8363_) getChunkDebugData
(ChunkPos p_8449_) getChunkForLighting
(int p_8454_, int p_8455_) getChunkFuture
(int p_8432_, int p_8433_, ChunkStatus p_330326_, boolean p_8435_) private CompletableFuture
<ChunkResult<ChunkAccess>> getChunkFutureMainThread
(int p_8457_, int p_8458_, ChunkStatus p_331599_, boolean p_8460_) getChunkNow
(int p_8357_, int p_8358_) it.unimi.dsi.fastutil.longs.LongSet
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_381768_) void
onLightUpdate
(LightLayer p_8403_, SectionPos p_8404_) boolean
pollTask()
void
removeEntity
(Entity p_8444_) void
removeTicketWithRadius
(TicketType p_393514_, ChunkPos p_394302_, int p_393914_) (专用程序包) 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_331839_) void
tick
(BooleanSupplier p_201913_, boolean p_201914_) private void
private void
tickChunks
(ProfilerFiller p_364065_, long p_361343_) private void
tickSpawningChunk
(LevelChunk p_401862_, long p_401787_, List<MobCategory> p_401800_, NaturalSpawner.SpawnState p_401847_) boolean
updateChunkForced
(ChunkPos p_8400_, boolean p_8401_) 从类继承的方法 net.minecraft.world.level.chunk.ChunkSource
getChunk, onSectionEmptinessChanged
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.neoforge.common.extensions.IServerChunkCacheExtension
broadcast, broadcastAndSend, self
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
distanceManager
-
level
-
mainThread
-
lightEngine
-
mainThreadProcessor
-
chunkMap
-
dataStorage
-
ticketStorage
-
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
-
spawningChunks
-
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_330876_, 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_330326_, boolean p_8435_) -
getChunkFutureMainThread
private CompletableFuture<ChunkResult<ChunkAccess>> getChunkFutureMainThread(int p_8457_, int p_8458_, ChunkStatus p_331599_, boolean p_8460_) -
chunkAbsent
-
hasChunk
public boolean hasChunk(int p_8429_, int p_8430_) - 覆盖:
hasChunk
在类中ChunkSource
-
getChunkForLighting
- 指定者:
getChunkForLighting
在接口中LightChunkGetter
- 覆盖:
getChunkForLighting
在类中ChunkSource
-
getLevel
- 指定者:
getLevel
在接口中LightChunkGetter
-
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
-
tickChunks
-
tickSpawningChunk
private void tickSpawningChunk(LevelChunk p_401862_, long p_401787_, List<MobCategory> p_401800_, NaturalSpawner.SpawnState p_401847_) -
getFullChunk
-
gatherStats
- 指定者:
gatherStats
在类中ChunkSource
-
getPendingTasksCount
public int getPendingTasksCount() -
getGenerator
-
getGeneratorState
-
randomState
-
getLoadedChunksCount
public int getLoadedChunksCount()- 指定者:
getLoadedChunksCount
在类中ChunkSource
-
blockChanged
-
onLightUpdate
- 指定者:
onLightUpdate
在接口中LightChunkGetter
-
addTicket
-
addTicketWithRadius
-
removeTicketWithRadius
-
updateChunkForced
- 覆盖:
updateChunkForced
在类中ChunkSource
-
getForceLoadedChunks
public it.unimi.dsi.fastutil.longs.LongSet getForceLoadedChunks()- 覆盖:
getForceLoadedChunks
在类中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
-
deactivateTicketsOnClosing
public void deactivateTicketsOnClosing() -
onChunkReadyToSend
-