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 interface
ChunkHolder.IChunkLoadingError
static interface
ChunkHolder.IListener
static interface
ChunkHolder.IPlayerProvider
static class
ChunkHolder.LocationType
-
Field Summary
Fields Modifier and Type Field Description private int
blockChangedLightSectionFilter
private it.unimi.dsi.fastutil.shorts.ShortSet[]
changedBlocksPerSection
private static java.util.List<ChunkStatus>
CHUNK_STATUSES
private java.util.concurrent.CompletableFuture<IChunk>
chunkToSave
(package private) Chunk
currentlyLoading
private java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>
entityTickingChunkFuture
private static ChunkHolder.LocationType[]
FULL_CHUNK_STATUSES
private java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>
fullChunkFuture
private java.util.concurrent.atomic.AtomicReferenceArray<java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>>
futures
private boolean
hasChangedSections
private WorldLightManager
lightEngine
private int
oldTicketLevel
private ChunkHolder.IListener
onLevelChange
private ChunkHolder.IPlayerProvider
playerProvider
private ChunkPos
pos
private int
queueLevel
private boolean
resendLight
private int
skyChangedLightSectionFilter
private int
ticketLevel
private java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>
tickingChunkFuture
static com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>
UNLOADED_CHUNK
static java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>
UNLOADED_CHUNK_FUTURE
static com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>
UNLOADED_LEVEL_CHUNK
private static java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>
UNLOADED_LEVEL_CHUNK_FUTURE
private boolean
wasAccessibleSinceLastSave
-
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 void
blockChanged(BlockPos p_244386_1_)
private void
broadcast(IPacket<?> p_219293_1_, boolean p_219293_2_)
private void
broadcastBlockEntity(World p_219305_1_, BlockPos p_219305_2_)
private void
broadcastBlockEntityIfNeeded(World p_244385_1_, BlockPos p_244385_2_, BlockState p_244385_3_)
void
broadcastChanges(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.LocationType
getFullChunkStatus(int p_219286_0_)
ChunkHolder.LocationType
getFullStatus()
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_)
IChunk
getLastAvailable()
ChunkStatus
getLastAvailableStatus()
java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>>
getOrScheduleFuture(ChunkStatus p_219276_1_, ChunkManager p_219276_2_)
ChunkPos
getPos()
int
getQueueLevel()
static ChunkStatus
getStatus(int p_219278_0_)
int
getTicketLevel()
Chunk
getTickingChunk()
java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>
getTickingChunkFuture()
void
refreshAccessibility()
void
replaceProtoChunk(ChunkPrimerWrapper p_219294_1_)
void
sectionLightChanged(LightType p_219280_1_, int p_219280_2_)
private void
setQueueLevel(int p_219275_1_)
void
setTicketLevel(int p_219292_1_)
private void
updateChunkToSave(java.util.concurrent.CompletableFuture<? extends com.mojang.datafixers.util.Either<? extends IChunk,ChunkHolder.IChunkLoadingError>> p_219284_1_)
protected void
updateFutures(ChunkManager p_219291_1_)
boolean
wasAccessibleSinceLastSave()
-
-
-
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_)
-
-