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 ClientLevelprivate final LevelLightEngine(package private) static final org.slf4j.Logger(package private) ClientChunkCache.Storage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalculateStorageRange(int viewDistance) voidgetChunk(int x, int z, ChunkStatus chunkStatus, boolean requireChunk) getLevel()intit.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static booleanisValidChunk(LevelChunk chunk, int x, int z) voidonLightUpdate(LightLayer type, SectionPos pos) voidonSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) voidreplaceBiomes(int x, int z, FriendlyByteBuf buffer) replaceWithPacketData(int x, int z, FriendlyByteBuf readBuffer, Map<Heightmap.Types, long[]> heightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> consumer) voidtick(BooleanSupplier hasTimeLeft, boolean tickChunks) voidupdateViewCenter(int x, int z) voidupdateViewRadius(int viewDistance) Methods inherited from class net.minecraft.world.level.chunk.ChunkSource
close, getChunk, getChunkForLighting, getChunkNow, getForceLoadedChunks, hasChunk, setSpawnSettings, updateChunkForced
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
emptyChunk
-
lightEngine
-
storage
-
level
-
-
Constructor Details
-
ClientChunkCache
-
-
Method Details
-
getLightEngine
- Specified by:
getLightEnginein classChunkSource
-
isValidChunk
-
drop
-
getChunk
- Specified by:
getChunkin classChunkSource
-
getLevel
-
replaceBiomes
-
replaceWithPacketData
@Nullable public LevelChunk replaceWithPacketData(int x, int z, FriendlyByteBuf readBuffer, Map<Heightmap.Types, long[]> heightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> consumer) -
tick
- Specified by:
tickin 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:
gatherStatsin classChunkSource
-
getLoadedChunksCount
public int getLoadedChunksCount()- Specified by:
getLoadedChunksCountin classChunkSource
-
onLightUpdate
-
getLoadedEmptySections
public it.unimi.dsi.fastutil.longs.LongOpenHashSet getLoadedEmptySections() -
onSectionEmptinessChanged
public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) - Overrides:
onSectionEmptinessChangedin classChunkSource
-