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 chunkX, int chunkZ, boolean load) abstract ChunkAccessgetChunk(int x, int z, ChunkStatus chunkStatus, boolean requireChunk) getChunkForLighting(int chunkX, int chunkZ) getChunkNow(int chunkX, int chunkZ) abstract LevelLightEngineabstract intbooleanhasChunk(int chunkX, int chunkZ) voidsetSpawnSettings(boolean hostile, boolean peaceful) abstract voidtick(BooleanSupplier hasTimeLeft, boolean tickChunks) voidupdateChunkForced(ChunkPos pos, boolean add) 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 chunkX, int chunkZ) - Returns:
trueif a chunk is loaded at the provided position, without forcing a chunk load.
-
getChunk
@Nullable public abstract ChunkAccess getChunk(int x, int z, ChunkStatus chunkStatus, boolean requireChunk) -
tick
-
gatherStats
-
getLoadedChunksCount
public abstract int getLoadedChunksCount() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getLightEngine
-
setSpawnSettings
public void setSpawnSettings(boolean hostile, boolean peaceful) -
updateChunkForced
-