@Environment(value=CLIENT) public class ClientChunkManager extends ChunkManager
Modifier and Type | Class and Description |
---|---|
(package private) class |
ClientChunkManager.ClientChunkMap |
Modifier and Type | Field and Description |
---|---|
private ClientChunkManager.ClientChunkMap |
chunks |
private WorldChunk |
emptyChunk |
private LightingProvider |
lightingProvider |
private static Logger |
LOGGER |
private ClientWorld |
world |
Constructor and Description |
---|
ClientChunkManager(ClientWorld world,
int loadDistance) |
Modifier and Type | Method and Description |
---|---|
WorldChunk |
getChunk(int int2,
int int3,
ChunkStatus chunkStatus,
boolean bool) |
private static int |
getChunkMapRadius(int loadDistance) |
String |
getDebugString() |
LightingProvider |
getLightingProvider() |
int |
getLoadedChunkCount() |
BlockView |
getWorld() |
WorldChunk |
loadChunkFromPacket(int x,
int z,
BiomeArray biomes,
PacketByteBuf buf,
CompoundTag tag,
int verticalStripBitmask,
boolean complete) |
void |
onLightUpdate(LightType type,
ChunkSectionPos pos) |
private static boolean |
positionEquals(WorldChunk chunk,
int x,
int y) |
void |
setChunkMapCenter(int x,
int z) |
boolean |
shouldTickBlock(BlockPos pos) |
boolean |
shouldTickChunk(ChunkPos pos) |
boolean |
shouldTickEntity(Entity entity) |
void |
tick(BooleanSupplier shouldKeepTicking) |
void |
unload(int chunkX,
int chunkZ) |
void |
updateLoadDistance(int loadDistance) |
close, getChunk, getWorldChunk, getWorldChunk, isChunkLoaded, setChunkForced, setMobSpawnOptions
private static final Logger LOGGER
private final WorldChunk emptyChunk
private final LightingProvider lightingProvider
private volatile ClientChunkManager.ClientChunkMap chunks
private final ClientWorld world
public ClientChunkManager(ClientWorld world, int loadDistance)
public LightingProvider getLightingProvider()
getLightingProvider
in class ChunkManager
private static boolean positionEquals(@Nullable WorldChunk chunk, int x, int y)
public void unload(int chunkX, int chunkZ)
@Nullable public WorldChunk getChunk(int int2, int int3, ChunkStatus chunkStatus, boolean bool)
getChunk
in class ChunkManager
public BlockView getWorld()
@Nullable public WorldChunk loadChunkFromPacket(int x, int z, @Nullable BiomeArray biomes, PacketByteBuf buf, CompoundTag tag, int verticalStripBitmask, boolean complete)
public void tick(BooleanSupplier shouldKeepTicking)
public void setChunkMapCenter(int x, int z)
public void updateLoadDistance(int loadDistance)
private static int getChunkMapRadius(int loadDistance)
public String getDebugString()
getDebugString
in class ChunkManager
public int getLoadedChunkCount()
public void onLightUpdate(LightType type, ChunkSectionPos pos)
public boolean shouldTickBlock(BlockPos pos)
shouldTickBlock
in class ChunkManager
public boolean shouldTickChunk(ChunkPos pos)
shouldTickChunk
in class ChunkManager
public boolean shouldTickEntity(Entity entity)
shouldTickEntity
in class ChunkManager