Package net.minecraft.server.world
Class ChunkHolder
java.lang.Object
net.minecraft.server.world.ChunkHolder
public class ChunkHolder extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChunkHolder.LevelType
static interface
ChunkHolder.LevelUpdateListener
static interface
ChunkHolder.PlayersWatchingChunkProvider
static interface
ChunkHolder.Unloaded
Used to represent a chunk that has not been loaded yet. -
Field Summary
-
Constructor Summary
Constructors Constructor Description ChunkHolder(ChunkPos pos, int level, LightingProvider lightingProvider, ChunkHolder.LevelUpdateListener levelUpdateListener, ChunkHolder.PlayersWatchingChunkProvider playersWatchingChunkProvider)
-
Method Summary
-
Field Details
-
UNLOADED_CHUNK
-
UNLOADED_CHUNK_FUTURE
public static final CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.Unloaded>> UNLOADED_CHUNK_FUTURE -
UNLOADED_WORLD_CHUNK
public static final com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded> UNLOADED_WORLD_CHUNK -
UNLOADED_WORLD_CHUNK_FUTURE
private static final CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> UNLOADED_WORLD_CHUNK_FUTURE -
CHUNK_STATUSES
-
LEVEL_TYPES
-
futuresByStatus
private final AtomicReferenceArray<CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.Unloaded>>> futuresByStatus -
accessibleFuture
private volatile CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> accessibleFuture -
tickingFuture
private volatile CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> tickingFuture -
entityTickingFuture
private volatile CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> entityTickingFuture -
savingFuture
-
lastTickLevel
private int lastTickLevel -
level
private int level -
completedLevel
private int completedLevel -
pos
-
pendingBlockUpdates
private boolean pendingBlockUpdatesIndicates thatblockUpdatesBySection
contains at least one entry. -
blockUpdatesBySection
Contains the packed chunk-local positions that have been marked for update bymarkForBlockUpdate(net.minecraft.util.math.BlockPos)
, grouped by their vertical chunk section.Entries for a section are null if the section has no positions marked for update.
-
blockLightUpdateBits
private int blockLightUpdateBits -
skyLightUpdateBits
private int skyLightUpdateBits -
lightingProvider
-
levelUpdateListener
-
playersWatchingChunkProvider
-
accessible
private boolean accessible -
field_26744
private boolean field_26744
-
-
Constructor Details
-
ChunkHolder
public ChunkHolder(ChunkPos pos, int level, LightingProvider lightingProvider, ChunkHolder.LevelUpdateListener levelUpdateListener, ChunkHolder.PlayersWatchingChunkProvider playersWatchingChunkProvider)
-
-
Method Details
-
getFutureFor
public CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.Unloaded>> getFutureFor(ChunkStatus leastStatus) -
getValidFutureFor
public CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.Unloaded>> getValidFutureFor(ChunkStatus leastStatus) -
getTickingFuture
public CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> getTickingFuture() -
getEntityTickingFuture
public CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> getEntityTickingFuture() -
getAccessibleFuture
public CompletableFuture<com.mojang.datafixers.util.Either<WorldChunk,ChunkHolder.Unloaded>> getAccessibleFuture() -
getWorldChunk
-
getCurrentStatus
-
getCurrentChunk
-
getSavingFuture
-
markForBlockUpdate
-
markForLightUpdate
- Parameters:
y
- chunk section y coordinate
-
flushUpdates
-
tryUpdateBlockEntityAt
-
sendBlockEntityUpdatePacket
-
sendPacketToPlayersWatching
-
getChunkAt
public CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.Unloaded>> getChunkAt(ChunkStatus targetStatus, ThreadedAnvilChunkStorage chunkStorage) -
combineSavingFuture
private void combineSavingFuture(CompletableFuture<? extends com.mojang.datafixers.util.Either<? extends Chunk,ChunkHolder.Unloaded>> then) -
getLevelType
-
getPos
-
getLevel
public int getLevel() -
getCompletedLevel
public int getCompletedLevel() -
setCompletedLevel
private void setCompletedLevel(int level) -
setLevel
public void setLevel(int level) -
tick
-
getTargetStatusForLevel
-
getLevelType
-
isAccessible
public boolean isAccessible() -
updateAccessibleStatus
public void updateAccessibleStatus() -
setCompletedChunk
-