Package net.minecraft.world.level.chunk
Class ChunkSource
java.lang.Object
net.minecraft.world.level.chunk.ChunkSource
- All Implemented Interfaces:
AutoCloseable,LightChunkGetter
- Direct Known Subclasses:
ClientChunkCache,ServerChunkCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()abstract StringgetChunk(int pChunkX, int pChunkZ, boolean pLoad) abstract ChunkAccessgetChunk(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) getChunkForLighting(int p_62241_, int p_62242_) getChunkNow(int pChunkX, int pChunkZ) it.unimi.dsi.fastutil.longs.LongSetabstract LevelLightEngineabstract intbooleanhasChunk(int pChunkX, int pChunkZ) voidonSectionEmptinessChanged(int pX, int pY, int pZ, boolean pIsEmpty) voidsetSpawnSettings(boolean pSpawnSettings) abstract voidtick(BooleanSupplier pHasTimeLeft, boolean pTickChunks) booleanupdateChunkForced(ChunkPos pChunkPos, boolean pAdd) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.chunk.LightChunkGetter
getLevel, onLightUpdate
-
Constructor Details
-
ChunkSource
public ChunkSource()
-
-
Method Details
-
getChunk
-
getChunkNow
-
getChunkForLighting
- Specified by:
getChunkForLightingin interfaceLightChunkGetter
-
hasChunk
public boolean hasChunk(int pChunkX, int pChunkZ) - Returns:
trueif a chunk is loaded at the provided position, without forcing a chunk load.
-
getChunk
@Nullable public abstract ChunkAccess getChunk(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) -
tick
-
onSectionEmptinessChanged
public void onSectionEmptinessChanged(int pX, int pY, int pZ, boolean pIsEmpty) -
gatherStats
-
getLoadedChunksCount
public abstract int getLoadedChunksCount() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getLightEngine
-
setSpawnSettings
public void setSpawnSettings(boolean pSpawnSettings) -
updateChunkForced
-
getForceLoadedChunks
public it.unimi.dsi.fastutil.longs.LongSet getForceLoadedChunks()
-