Package net.minecraft.client.multiplayer
Class ClientChunkCache
java.lang.Object
net.minecraft.world.level.chunk.ChunkSource
net.minecraft.client.multiplayer.ClientChunkCache
- All Implemented Interfaces:
AutoCloseable
,LightChunkGetter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevelChunk
(package private) final ClientLevel
private final LevelLightEngine
(package private) static final org.slf4j.Logger
(package private) ClientChunkCache.Storage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calculateStorageRange
(int pViewDistance) void
getChunk
(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) getLevel()
int
private static boolean
isValidChunk
(LevelChunk pChunk, int pX, int pZ) void
onLightUpdate
(LightLayer pType, SectionPos pPos) void
replaceBiomes
(int pX, int pZ, FriendlyByteBuf pBuffer) replaceWithPacketData
(int pX, int pZ, FriendlyByteBuf pBuffer, CompoundTag pTag, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> pConsumer) void
tick
(BooleanSupplier pHasTimeLeft, boolean pTickChunks) void
updateViewCenter
(int pX, int pZ) void
updateViewRadius
(int pViewDistance) Methods inherited from class net.minecraft.world.level.chunk.ChunkSource
close, getChunk, getChunkForLighting, getChunkNow, hasChunk, setSpawnSettings, updateChunkForced
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
emptyChunk
-
lightEngine
-
storage
-
level
-
-
Constructor Details
-
ClientChunkCache
-
-
Method Details
-
getLightEngine
- Specified by:
getLightEngine
in classChunkSource
-
isValidChunk
-
drop
-
getChunk
@Nullable public LevelChunk getChunk(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) - Specified by:
getChunk
in classChunkSource
-
getLevel
-
replaceBiomes
-
replaceWithPacketData
@Nullable public LevelChunk replaceWithPacketData(int pX, int pZ, FriendlyByteBuf pBuffer, CompoundTag pTag, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> pConsumer) -
tick
- Specified by:
tick
in classChunkSource
-
updateViewCenter
public void updateViewCenter(int pX, int pZ) -
updateViewRadius
public void updateViewRadius(int pViewDistance) -
calculateStorageRange
private static int calculateStorageRange(int pViewDistance) -
gatherStats
- Specified by:
gatherStats
in classChunkSource
-
getLoadedChunksCount
public int getLoadedChunksCount()- Specified by:
getLoadedChunksCount
in classChunkSource
-
onLightUpdate
-