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 LevelChunkprivate final ClientLevelprivate final LevelLightEngineprivate static final org.slf4j.Loggerprivate ClientChunkCache.Storage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionit.unimi.dsi.fastutil.longs.LongOpenHashSetit.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static intcalculateStorageRange(int viewRange) voidvoidgetChunk(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate) getLevel()intprivate static booleanisValidChunk(@Nullable LevelChunk chunk, int x, int z) voidonLightUpdate(LightLayer layer, SectionPos pos) voidonSectionEmptinessChanged(int sectionX, int sectionY, int sectionZ, boolean empty) it.unimi.dsi.fastutil.longs.LongOpenHashSetit.unimi.dsi.fastutil.longs.LongOpenHashSetvoidreplaceBiomes(int chunkX, int chunkZ, FriendlyByteBuf readBuffer) replaceWithPacketData(int chunkX, int chunkZ, ClientboundLevelChunkPacketData chunkData) voidtick(BooleanSupplier haveTime, boolean tickChunks) voidupdateViewCenter(int x, int z) voidupdateViewRadius(int viewRange) Methods inherited from class ChunkSource
close, getChunk, getChunkForLighting, getChunkNow, getForceLoadedChunks, hasChunk, setSpawnSettings, updateChunkForced
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
emptyChunk
-
lightEngine
-
storage
-
level
-
-
Constructor Details
-
ClientChunkCache
-
-
Method Details
-
getLightEngine
- Specified by:
getLightEnginein classChunkSource
-
isValidChunk
-
drop
-
getChunk
public @Nullable LevelChunk getChunk(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate) - Specified by:
getChunkin classChunkSource
-
getLevel
-
replaceBiomes
-
replaceWithPacketData
public @Nullable LevelChunk replaceWithPacketData(int chunkX, int chunkZ, ClientboundLevelChunkPacketData chunkData) -
tick
- Specified by:
tickin classChunkSource
-
updateViewCenter
public void updateViewCenter(int x, int z) -
updateViewRadius
public void updateViewRadius(int viewRange) -
calculateStorageRange
private static int calculateStorageRange(int viewRange) -
gatherStats
- Specified by:
gatherStatsin classChunkSource
-
getLoadedChunksCount
public int getLoadedChunksCount()- Specified by:
getLoadedChunksCountin classChunkSource
-
onLightUpdate
-
addedEmptySections
public it.unimi.dsi.fastutil.longs.LongOpenHashSet addedEmptySections() -
removedEmptySections
public it.unimi.dsi.fastutil.longs.LongOpenHashSet removedEmptySections() -
addedLoadedChunks
public it.unimi.dsi.fastutil.longs.LongOpenHashSet addedLoadedChunks() -
removedLoadedChunks
public it.unimi.dsi.fastutil.longs.LongOpenHashSet removedLoadedChunks() -
flipUpdateTrackingSets
public void flipUpdateTrackingSets() -
onSectionEmptinessChanged
public void onSectionEmptinessChanged(int sectionX, int sectionY, int sectionZ, boolean empty) - Overrides:
onSectionEmptinessChangedin classChunkSource
-