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 pViewDistance) voidgetChunk(int p_104451_, int p_104452_, ChunkStatus p_330230_, boolean p_104454_) getLevel()intit.unimi.dsi.fastutil.longs.LongOpenHashSetprivate static booleanisValidChunk(LevelChunk pChunk, int pX, int pZ) voidonLightUpdate(LightLayer pType, SectionPos pPos) voidonSectionEmptinessChanged(int p_366524_, int p_366407_, int p_366651_, boolean p_366887_) voidreplaceBiomes(int pX, int pZ, FriendlyByteBuf pBuffer) replaceWithPacketData(int pX, int pZ, FriendlyByteBuf pReadBuffer, Map<Heightmap.Types, long[]> pHeightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> pConsumer) voidtick(BooleanSupplier p_202421_, boolean p_202422_) voidupdateViewCenter(int pX, int pZ) voidupdateViewRadius(int pViewDistance) 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
@Nullable public LevelChunk getChunk(int p_104451_, int p_104452_, ChunkStatus p_330230_, boolean p_104454_) - Specified by:
getChunkin classChunkSource
-
getLevel
-
replaceBiomes
-
replaceWithPacketData
@Nullable public LevelChunk replaceWithPacketData(int pX, int pZ, FriendlyByteBuf pReadBuffer, Map<Heightmap.Types, long[]> pHeightmaps, Consumer<ClientboundLevelChunkPacketData.BlockEntityTagOutput> pConsumer) -
tick
- Specified by:
tickin 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:
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 p_366524_, int p_366407_, int p_366651_, boolean p_366887_) - Overrides:
onSectionEmptinessChangedin classChunkSource
-