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 viewDistance) void
getChunk
(int x, int z, ChunkStatus chunkStatus, boolean requireChunk) getLevel()
int
private static boolean
isValidChunk
(LevelChunk chunk, int x, int z) void
onLightUpdate
(LightLayer type, SectionPos pos) void
replaceBiomes
(int x, int z, FriendlyByteBuf buffer) replaceWithPacketData
(int x, int z, FriendlyByteBuf buffer, CompoundTag tag, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> consumer) void
tick
(BooleanSupplier hasTimeLeft, boolean tickChunks) void
updateViewCenter
(int x, int z) void
updateViewRadius
(int viewDistance) 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
- Specified by:
getChunk
in classChunkSource
-
getLevel
-
replaceBiomes
-
replaceWithPacketData
@Nullable public LevelChunk replaceWithPacketData(int x, int z, FriendlyByteBuf buffer, CompoundTag tag, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> consumer) -
tick
- Specified by:
tick
in classChunkSource
-
updateViewCenter
public void updateViewCenter(int x, int z) -
updateViewRadius
public void updateViewRadius(int viewDistance) -
calculateStorageRange
private static int calculateStorageRange(int viewDistance) -
gatherStats
- Specified by:
gatherStats
in classChunkSource
-
getLoadedChunksCount
public int getLoadedChunksCount()- Specified by:
getLoadedChunksCount
in classChunkSource
-
onLightUpdate
-