Package net.minecraft.world.server
Class ChunkHolder
- java.lang.Object
-
- net.minecraft.world.server.ChunkHolder
-
public class ChunkHolder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceChunkHolder.IChunkLoadingErrorstatic interfaceChunkHolder.IListenerstatic interfaceChunkHolder.IPlayerProviderstatic classChunkHolder.LocationType
-
Field Summary
Fields Modifier and Type Field Description private intblockChangedLightSectionFilterprivate it.unimi.dsi.fastutil.shorts.ShortSet[]changedBlocksPerSectionprivate static java.util.List<ChunkStatus>CHUNK_STATUSESprivate java.util.concurrent.CompletableFuture<IChunk>chunkToSave(package private) ChunkcurrentlyLoadingprivate java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>entityTickingChunkFutureprivate static ChunkHolder.LocationType[]FULL_CHUNK_STATUSESprivate java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>fullChunkFutureprivate java.util.concurrent.atomic.AtomicReferenceArray<java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>>futuresprivate booleanhasChangedSectionsprivate WorldLightManagerlightEngineprivate intoldTicketLevelprivate ChunkHolder.IListeneronLevelChangeprivate ChunkHolder.IPlayerProviderplayerProviderprivate ChunkPosposprivate intqueueLevelprivate booleanresendLightprivate intskyChangedLightSectionFilterprivate intticketLevelprivate java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>tickingChunkFuturestatic com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>UNLOADED_CHUNKstatic java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>UNLOADED_CHUNK_FUTUREstatic com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>UNLOADED_LEVEL_CHUNKprivate static java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>UNLOADED_LEVEL_CHUNK_FUTUREprivate booleanwasAccessibleSinceLastSave
-
Constructor Summary
Constructors Constructor Description ChunkHolder(ChunkPos p_i50716_1_, int p_i50716_2_, WorldLightManager p_i50716_3_, ChunkHolder.IListener p_i50716_4_, ChunkHolder.IPlayerProvider p_i50716_5_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblockChanged(BlockPos p_244386_1_)private voidbroadcast(IPacket<?> p_219293_1_, boolean p_219293_2_)private voidbroadcastBlockEntity(World p_219305_1_, BlockPos p_219305_2_)private voidbroadcastBlockEntityIfNeeded(World p_244385_1_, BlockPos p_244385_2_, BlockState p_244385_3_)voidbroadcastChanges(Chunk p_219274_1_)java.util.concurrent.CompletableFuture<IChunk>getChunkToSave()java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>getEntityTickingChunkFuture()java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>getFullChunkFuture()static ChunkHolder.LocationTypegetFullChunkStatus(int p_219286_0_)ChunkHolder.LocationTypegetFullStatus()java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>getFutureIfPresent(ChunkStatus p_225410_1_)java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>getFutureIfPresentUnchecked(ChunkStatus p_219301_1_)IChunkgetLastAvailable()ChunkStatusgetLastAvailableStatus()java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>getOrScheduleFuture(ChunkStatus p_219276_1_, ChunkManager p_219276_2_)ChunkPosgetPos()intgetQueueLevel()static ChunkStatusgetStatus(int p_219278_0_)intgetTicketLevel()ChunkgetTickingChunk()java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>getTickingChunkFuture()voidrefreshAccessibility()voidreplaceProtoChunk(ChunkPrimerWrapper p_219294_1_)voidsectionLightChanged(LightType p_219280_1_, int p_219280_2_)private voidsetQueueLevel(int p_219275_1_)voidsetTicketLevel(int p_219292_1_)private voidupdateChunkToSave(java.util.concurrent.CompletableFuture<? extends com.mojang.datafixers.util.Either<? extends IChunk,ChunkHolder.IChunkLoadingError>> p_219284_1_)protected voidupdateFutures(ChunkManager p_219291_1_)booleanwasAccessibleSinceLastSave()
-
-
-
Field Detail
-
UNLOADED_CHUNK
public static final com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError> UNLOADED_CHUNK
-
UNLOADED_CHUNK_FUTURE
public static final java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> UNLOADED_CHUNK_FUTURE
-
UNLOADED_LEVEL_CHUNK
public static final com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError> UNLOADED_LEVEL_CHUNK
-
UNLOADED_LEVEL_CHUNK_FUTURE
private static final java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> UNLOADED_LEVEL_CHUNK_FUTURE
-
CHUNK_STATUSES
private static final java.util.List<ChunkStatus> CHUNK_STATUSES
-
FULL_CHUNK_STATUSES
private static final ChunkHolder.LocationType[] FULL_CHUNK_STATUSES
-
futures
private final java.util.concurrent.atomic.AtomicReferenceArray<java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>> futures
-
fullChunkFuture
private volatile java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> fullChunkFuture
-
tickingChunkFuture
private volatile java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> tickingChunkFuture
-
entityTickingChunkFuture
private volatile java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> entityTickingChunkFuture
-
chunkToSave
private java.util.concurrent.CompletableFuture<IChunk> chunkToSave
-
oldTicketLevel
private int oldTicketLevel
-
ticketLevel
private int ticketLevel
-
queueLevel
private int queueLevel
-
pos
private final ChunkPos pos
-
hasChangedSections
private boolean hasChangedSections
-
changedBlocksPerSection
private final it.unimi.dsi.fastutil.shorts.ShortSet[] changedBlocksPerSection
-
blockChangedLightSectionFilter
private int blockChangedLightSectionFilter
-
skyChangedLightSectionFilter
private int skyChangedLightSectionFilter
-
lightEngine
private final WorldLightManager lightEngine
-
onLevelChange
private final ChunkHolder.IListener onLevelChange
-
playerProvider
private final ChunkHolder.IPlayerProvider playerProvider
-
wasAccessibleSinceLastSave
private boolean wasAccessibleSinceLastSave
-
resendLight
private boolean resendLight
-
currentlyLoading
Chunk currentlyLoading
-
-
Constructor Detail
-
ChunkHolder
public ChunkHolder(ChunkPos p_i50716_1_, int p_i50716_2_, WorldLightManager p_i50716_3_, ChunkHolder.IListener p_i50716_4_, ChunkHolder.IPlayerProvider p_i50716_5_)
-
-
Method Detail
-
getFutureIfPresentUnchecked
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> getFutureIfPresentUnchecked(ChunkStatus p_219301_1_)
-
getFutureIfPresent
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> getFutureIfPresent(ChunkStatus p_225410_1_)
-
getTickingChunkFuture
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> getTickingChunkFuture()
-
getEntityTickingChunkFuture
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> getEntityTickingChunkFuture()
-
getFullChunkFuture
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>> getFullChunkFuture()
-
getTickingChunk
@Nullable public Chunk getTickingChunk()
-
getLastAvailableStatus
@Nullable public ChunkStatus getLastAvailableStatus()
-
getLastAvailable
@Nullable public IChunk getLastAvailable()
-
getChunkToSave
public java.util.concurrent.CompletableFuture<IChunk> getChunkToSave()
-
blockChanged
public void blockChanged(BlockPos p_244386_1_)
-
sectionLightChanged
public void sectionLightChanged(LightType p_219280_1_, int p_219280_2_)
-
broadcastChanges
public void broadcastChanges(Chunk p_219274_1_)
-
broadcastBlockEntityIfNeeded
private void broadcastBlockEntityIfNeeded(World p_244385_1_, BlockPos p_244385_2_, BlockState p_244385_3_)
-
broadcast
private void broadcast(IPacket<?> p_219293_1_, boolean p_219293_2_)
-
getOrScheduleFuture
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> getOrScheduleFuture(ChunkStatus p_219276_1_, ChunkManager p_219276_2_)
-
updateChunkToSave
private void updateChunkToSave(java.util.concurrent.CompletableFuture<? extends com.mojang.datafixers.util.Either<? extends IChunk,ChunkHolder.IChunkLoadingError>> p_219284_1_)
-
getFullStatus
public ChunkHolder.LocationType getFullStatus()
-
getPos
public ChunkPos getPos()
-
getTicketLevel
public int getTicketLevel()
-
getQueueLevel
public int getQueueLevel()
-
setQueueLevel
private void setQueueLevel(int p_219275_1_)
-
setTicketLevel
public void setTicketLevel(int p_219292_1_)
-
updateFutures
protected void updateFutures(ChunkManager p_219291_1_)
-
getStatus
public static ChunkStatus getStatus(int p_219278_0_)
-
getFullChunkStatus
public static ChunkHolder.LocationType getFullChunkStatus(int p_219286_0_)
-
wasAccessibleSinceLastSave
public boolean wasAccessibleSinceLastSave()
-
refreshAccessibility
public void refreshAccessibility()
-
replaceProtoChunk
public void replaceProtoChunk(ChunkPrimerWrapper p_219294_1_)
-
-