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 TypeMethodDescriptionvoid
close()
abstract String
getChunk
(int pChunkX, int pChunkZ, boolean pLoad) abstract ChunkAccess
getChunk
(int pX, int pZ, ChunkStatus pChunkStatus, boolean pRequireChunk) getChunkForLighting
(int pChunkX, int pChunkZ) getChunkNow
(int pChunkX, int pChunkZ) abstract LevelLightEngine
abstract int
boolean
hasChunk
(int pChunkX, int pChunkZ) void
setSpawnSettings
(boolean pHostile, boolean pPeaceful) abstract void
tick
(BooleanSupplier pHasTimeLeft, boolean pTickChunks) void
updateChunkForced
(ChunkPos pPos, boolean pAdd) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.chunk.LightChunkGetter
getLevel, onLightUpdate
-
Constructor Details
-
ChunkSource
public ChunkSource()
-
-
Method Details
-
getChunk
-
getChunkNow
-
getChunkForLighting
- Specified by:
getChunkForLighting
in interfaceLightChunkGetter
-
hasChunk
public boolean hasChunk(int pChunkX, int pChunkZ) - Returns:
true
if 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
-
gatherStats
-
getLoadedChunksCount
public abstract int getLoadedChunksCount() -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
getLightEngine
-
setSpawnSettings
public void setSpawnSettings(boolean pHostile, boolean pPeaceful) -
updateChunkForced
-