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 TypeMethodDescriptionprivate static intcalculateStorageRange(int viewRange) void@Nullable LevelChunkgetChunk(int x, int z, ChunkStatus targetStatus, boolean loadOrGenerate) getLevel()intit.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static booleanisValidChunk(@Nullable LevelChunk chunk, int x, int z) voidonLightUpdate(LightLayer layer, SectionPos pos) voidonSectionEmptinessChanged(int sectionX, int sectionY, int sectionZ, boolean empty) voidreplaceBiomes(int chunkX, int chunkZ, FriendlyByteBuf readBuffer) @Nullable LevelChunkreplaceWithPacketData(int chunkX, int chunkZ, FriendlyByteBuf readBuffer, Map<Heightmap.Types, long[]> heightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> blockEntities) 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, FriendlyByteBuf readBuffer, Map<Heightmap.Types, long[]> heightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> blockEntities) -
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
-
getLoadedEmptySections
public it.unimi.dsi.fastutil.longs.LongOpenHashSet getLoadedEmptySections() -
onSectionEmptinessChanged
public void onSectionEmptinessChanged(int sectionX, int sectionY, int sectionZ, boolean empty) - Overrides:
onSectionEmptinessChangedin classChunkSource
-