类 ChunkMap
java.lang.Object
net.minecraft.world.level.chunk.storage.ChunkStorage
net.minecraft.server.level.ChunkMap
- 所有已实现的接口:
AutoCloseable
,ChunkHolder.PlayerProvider
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private static final int
private static final int
private static final byte
private static final byte
private static final byte
private final ChunkGeneratorStructureState
private final it.unimi.dsi.fastutil.longs.Long2LongMap
private final ChunkStatusUpdateListener
private final it.unimi.dsi.fastutil.longs.Long2ByteMap
private final ChunkMap.DistanceManager
private static final int
private final it.unimi.dsi.fastutil.longs.LongSet
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ChunkMap.TrackedEntity>
static final int
private ChunkGenerator
(专用程序包) final ServerLevel
private final ThreadedLevelLightEngine
private static final org.slf4j.Logger
private final BlockableEventLoop<Runnable>
private final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>>
static final int
private static final int
private boolean
private final Supplier<DimensionDataStorage>
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
private final PlayerMap
private final PoiManager
private final ChunkProgressListener
private final ChunkTaskPriorityQueueSorter
private final RandomState
private final String
private final StructureTemplateManager
private final AtomicInteger
(专用程序包) final it.unimi.dsi.fastutil.longs.LongSet
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
(专用程序包) int
private it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder>
private final ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<Runnable>>
从类继承的字段 net.minecraft.world.level.chunk.storage.ChunkStorage
fixerUpper, LAST_MONOLYTH_STRUCTURE_DATA_VERSION
-
构造器概要
构造器构造器说明ChunkMap
(ServerLevel pLevel, LevelStorageSource.LevelStorageAccess pLevelStorageAccess, com.mojang.datafixers.DataFixer pFixerUpper, StructureTemplateManager pStructureManager, Executor pDispatcher, BlockableEventLoop<Runnable> pMainThreadExecutor, LightChunkGetter pLightChunk, ChunkGenerator pGenerator, ChunkProgressListener pProgressListener, ChunkStatusUpdateListener pChunkStatusListener, Supplier<DimensionDataStorage> pOverworldDataStorage, int pViewDistance, boolean pSync) -
方法概要
修饰符和类型方法说明protected void
(专用程序包) boolean
anyPlayerCloseEnoughForSpawning
(ChunkPos pChunkPos) void
protected void
broadcastAndSend
(Entity pEntity, Packet<?> pPacket) void
close()
private ChunkAccess
createEmptyChunk
(ChunkPos pChunkPos) debugFuturesAndCreateReportedException
(IllegalStateException pException, String pDetails) void
(专用程序包) void
dumpChunks
(Writer pWriter) private static double
euclideanDistanceSquared
(ChunkPos pChunkPos, Entity pEntity) protected ChunkGenerator
protected ChunkGeneratorStructureState
getChunkDebugData
(ChunkPos pPos) protected IntSupplier
getChunkQueueLevel
(long p_140372_) private CompletableFuture<com.mojang.datafixers.util.Either<List<ChunkAccess>,
ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture
(ChunkHolder p_281446_, int p_282030_, IntFunction<ChunkStatus> p_282923_) protected Iterable<ChunkHolder>
private ChunkStatus
getDependencyStatus
(ChunkStatus pChunkStatus, int p_140264_) protected ThreadedLevelLightEngine
getPlayers
(ChunkPos pPos, boolean pBoundaryOnly) getPlayersCloseForSpawning
(ChunkPos pChunkPos) protected PoiManager
int
protected ChunkHolder
getUpdatingChunkIfPresent
(long p_140175_) protected ChunkHolder
getVisibleChunkIfPresent
(long p_140328_) private com.mojang.datafixers.util.Either<ChunkAccess,
ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure
(Throwable pException, ChunkPos pChunkPos) boolean
hasWork()
private static boolean
isChunkDataValid
(CompoundTag pTag) static boolean
isChunkInRange
(int p_200879_, int p_200880_, int p_200881_, int p_200882_, int pMaxDistance) private static boolean
isChunkOnRangeBorder
(int p_183829_, int p_183830_, int p_183831_, int p_183832_, int p_183833_) private boolean
isExistingChunkFull
(ChunkPos pChunkPos) private byte
markPosition
(ChunkPos pChunkPos, ChunkStatus.ChunkType pChunkType) private void
markPositionReplaceable
(ChunkPos pChunkPos) void
move
(ServerPlayer pPlayer) (专用程序包) void
onFullChunkStatusChange
(ChunkPos p_287612_, FullChunkStatus p_287685_) private boolean
playerIsCloseEnoughForSpawning
(ServerPlayer pPlayer, ChunkPos pChunkPos) private void
playerLoadedChunk
(ServerPlayer pPlayer, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> pPacketCache, LevelChunk pChunk) private static void
postLoadProtoChunk
(ServerLevel pLevel, List<CompoundTag> pTags) CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,
ChunkHolder.ChunkLoadingFailure>> prepareAccessibleChunk
(ChunkHolder pHolder) CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,
ChunkHolder.ChunkLoadingFailure>> prepareEntityTickingChunk
(ChunkHolder pChunk) CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,
ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk
(ChunkHolder pHolder) private static String
printFuture
(CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> pFuture) private void
processUnloads
(BooleanSupplier pHasMoreTime) protected boolean
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,
ChunkHolder.ChunkLoadingFailure>> protoChunkToFullChunk
(ChunkHolder pHolder) protected RandomState
private CompletableFuture<Optional<CompoundTag>>
protected void
releaseLightTicket
(ChunkPos pChunkPos) protected void
removeEntity
(Entity pEntity) void
resendBiomesForChunks
(List<ChunkAccess> p_275577_) private boolean
save
(ChunkAccess p_140259_) protected void
saveAllChunks
(boolean pFlush) private boolean
saveChunkIfNeeded
(ChunkHolder p_198875_) CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,
ChunkHolder.ChunkLoadingFailure>> schedule
(ChunkHolder pHolder, ChunkStatus pStatus) private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,
ChunkHolder.ChunkLoadingFailure>> scheduleChunkGeneration
(ChunkHolder pChunkHolder, ChunkStatus pChunkStatus) private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,
ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad
(ChunkPos pChunkPos) private void
scheduleUnload
(long pChunkPos, ChunkHolder pChunkHolder) protected void
setViewDistance
(int pViewDistance) int
size()
private boolean
skipPlayer
(ServerPlayer pPlayer) protected void
tick()
protected void
tick
(BooleanSupplier pHasMoreTime) (专用程序包) ChunkHolder
updateChunkScheduling
(long pChunkPos, int pNewLevel, ChunkHolder pHolder, int pOldLevel) protected void
updateChunkTracking
(ServerPlayer pPlayer, ChunkPos pChunkPos, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> pPacketCache, boolean pWasLoaded, boolean pLoad) private SectionPos
updatePlayerPos
(ServerPlayer pPlayer) (专用程序包) void
updatePlayerStatus
(ServerPlayer pPlayer, boolean pTrack) private CompoundTag
upgradeChunkTag
(CompoundTag p_214948_) 从类继承的方法 net.minecraft.world.level.chunk.storage.ChunkStorage
chunkScanner, flushWorker, getVersion, injectDatafixingContext, isOldChunkAround, read, upgradeChunkTag, write
-
字段详细资料
-
CHUNK_TYPE_REPLACEABLE
private static final byte CHUNK_TYPE_REPLACEABLE- 另请参阅:
-
CHUNK_TYPE_UNKNOWN
private static final byte CHUNK_TYPE_UNKNOWN- 另请参阅:
-
CHUNK_TYPE_FULL
private static final byte CHUNK_TYPE_FULL- 另请参阅:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CHUNK_SAVED_PER_TICK
private static final int CHUNK_SAVED_PER_TICK- 另请参阅:
-
CHUNK_SAVED_EAGERLY_PER_TICK
private static final int CHUNK_SAVED_EAGERLY_PER_TICK- 另请参阅:
-
EAGER_CHUNK_SAVE_COOLDOWN_IN_MILLIS
private static final int EAGER_CHUNK_SAVE_COOLDOWN_IN_MILLIS- 另请参阅:
-
MIN_VIEW_DISTANCE
private static final int MIN_VIEW_DISTANCE- 另请参阅:
-
MAX_VIEW_DISTANCE
public static final int MAX_VIEW_DISTANCE- 另请参阅:
-
FORCED_TICKET_LEVEL
public static final int FORCED_TICKET_LEVEL -
updatingChunkMap
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder> updatingChunkMap -
visibleChunkMap
private volatile it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<ChunkHolder> visibleChunkMap -
pendingUnloads
-
entitiesInLevel
private final it.unimi.dsi.fastutil.longs.LongSet entitiesInLevel -
level
-
lightEngine
-
mainThreadExecutor
-
generator
-
randomState
-
chunkGeneratorState
-
overworldDataStorage
-
poiManager
-
toDrop
final it.unimi.dsi.fastutil.longs.LongSet toDrop -
modified
private boolean modified -
queueSorter
-
worldgenMailbox
-
mainThreadMailbox
-
progressListener
-
chunkStatusListener
-
distanceManager
-
tickingGenerated
-
structureTemplateManager
-
storageName
-
playerMap
-
entityMap
-
chunkTypeCache
private final it.unimi.dsi.fastutil.longs.Long2ByteMap chunkTypeCache -
chunkSaveCooldowns
private final it.unimi.dsi.fastutil.longs.Long2LongMap chunkSaveCooldowns -
unloadQueue
-
viewDistance
int viewDistance
-
-
构造器详细资料
-
ChunkMap
public ChunkMap(ServerLevel pLevel, LevelStorageSource.LevelStorageAccess pLevelStorageAccess, com.mojang.datafixers.DataFixer pFixerUpper, StructureTemplateManager pStructureManager, Executor pDispatcher, BlockableEventLoop<Runnable> pMainThreadExecutor, LightChunkGetter pLightChunk, ChunkGenerator pGenerator, ChunkProgressListener pProgressListener, ChunkStatusUpdateListener pChunkStatusListener, Supplier<DimensionDataStorage> pOverworldDataStorage, int pViewDistance, boolean pSync)
-
-
方法详细资料
-
generator
-
generatorState
-
randomState
-
debugReloadGenerator
public void debugReloadGenerator() -
euclideanDistanceSquared
-
isChunkInRange
public static boolean isChunkInRange(int p_200879_, int p_200880_, int p_200881_, int p_200882_, int pMaxDistance) -
isChunkOnRangeBorder
private static boolean isChunkOnRangeBorder(int p_183829_, int p_183830_, int p_183831_, int p_183832_, int p_183833_) -
getLightEngine
-
getUpdatingChunkIfPresent
-
getVisibleChunkIfPresent
-
getChunkQueueLevel
-
getChunkDebugData
-
getChunkRangeFuture
private CompletableFuture<com.mojang.datafixers.util.Either<List<ChunkAccess>,ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkHolder p_281446_, int p_282030_, IntFunction<ChunkStatus> p_282923_) -
debugFuturesAndCreateReportedException
public ReportedException debugFuturesAndCreateReportedException(IllegalStateException pException, String pDetails) -
prepareEntityTickingChunk
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,ChunkHolder.ChunkLoadingFailure>> prepareEntityTickingChunk(ChunkHolder pChunk) -
updateChunkScheduling
@Nullable ChunkHolder updateChunkScheduling(long pChunkPos, int pNewLevel, @Nullable ChunkHolder pHolder, int pOldLevel) -
close
- 指定者:
close
在接口中AutoCloseable
- 覆盖:
close
在类中ChunkStorage
- 抛出:
IOException
-
saveAllChunks
protected void saveAllChunks(boolean pFlush) -
tick
-
hasWork
public boolean hasWork() -
processUnloads
-
scheduleUnload
-
promoteChunkMap
protected boolean promoteChunkMap() -
schedule
public CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,ChunkHolder.ChunkLoadingFailure>> schedule(ChunkHolder pHolder, ChunkStatus pStatus) -
scheduleChunkLoad
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad(ChunkPos pChunkPos) -
isChunkDataValid
-
handleChunkLoadFailure
private com.mojang.datafixers.util.Either<ChunkAccess,ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable pException, ChunkPos pChunkPos) -
createEmptyChunk
-
markPositionReplaceable
-
markPosition
-
scheduleChunkGeneration
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,ChunkHolder.ChunkLoadingFailure>> scheduleChunkGeneration(ChunkHolder pChunkHolder, ChunkStatus pChunkStatus) -
releaseLightTicket
-
getDependencyStatus
-
postLoadProtoChunk
-
protoChunkToFullChunk
private CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess,ChunkHolder.ChunkLoadingFailure>> protoChunkToFullChunk(ChunkHolder pHolder) -
prepareTickingChunk
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk(ChunkHolder pHolder) -
prepareAccessibleChunk
public CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk,ChunkHolder.ChunkLoadingFailure>> prepareAccessibleChunk(ChunkHolder pHolder) -
getTickingGenerated
public int getTickingGenerated() -
saveChunkIfNeeded
-
save
-
isExistingChunkFull
-
setViewDistance
protected void setViewDistance(int pViewDistance) -
updateChunkTracking
protected void updateChunkTracking(ServerPlayer pPlayer, ChunkPos pChunkPos, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> pPacketCache, boolean pWasLoaded, boolean pLoad) -
size
public int size() -
getDistanceManager
-
getChunks
-
dumpChunks
- 抛出:
IOException
-
printFuture
private static String printFuture(CompletableFuture<com.mojang.datafixers.util.Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> pFuture) -
readChunk
-
upgradeChunkTag
-
anyPlayerCloseEnoughForSpawning
-
getPlayersCloseForSpawning
-
playerIsCloseEnoughForSpawning
-
skipPlayer
-
updatePlayerStatus
-
updatePlayerPos
-
move
-
getPlayers
- 指定者:
getPlayers
在接口中ChunkHolder.PlayerProvider
-
addEntity
-
removeEntity
-
tick
protected void tick() -
broadcast
-
broadcastAndSend
-
resendBiomesForChunks
-
playerLoadedChunk
private void playerLoadedChunk(ServerPlayer pPlayer, org.apache.commons.lang3.mutable.MutableObject<ClientboundLevelChunkWithLightPacket> pPacketCache, LevelChunk pChunk) -
getPoiManager
-
getStorageName
-
onFullChunkStatusChange
-