public class ChunkCache extends Object implements BlockView, CollisionView
Modifier and Type | Field and Description |
---|---|
protected Chunk[][] |
chunks |
protected boolean |
empty |
protected int |
minX |
protected int |
minZ |
protected World |
world |
Constructor and Description |
---|
ChunkCache(World world,
BlockPos minPos,
BlockPos maxPos) |
Modifier and Type | Method and Description |
---|---|
BlockEntity |
getBlockEntity(BlockPos pos) |
BlockState |
getBlockState(BlockPos pos) |
Stream<VoxelShape> |
getCollisions(Entity entity,
Box box,
Predicate<Entity> predicate) |
Stream<VoxelShape> |
getEntityCollisions(Entity entity,
Box box,
Predicate<Entity> predicate) |
BlockView |
getExistingChunk(int chunkX,
int chunkZ) |
FluidState |
getFluidState(BlockPos pos) |
WorldBorder |
getWorldBorder() |
private Chunk |
method_22353(int int2,
int int3) |
private Chunk |
method_22354(BlockPos blockPos) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canPlace, getBlockCollisions, getBlockCollisions, intersectsEntities, intersectsEntities, isBlockSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty
getDismountHeight, getDismountHeight, getHeight, getLuminance, getMaxLightLevel, method_29546, raycast, raycast, raycastBlock
protected final int minX
protected final int minZ
protected final Chunk[][] chunks
protected boolean empty
protected final World world
private Chunk method_22353(int int2, int int3)
public WorldBorder getWorldBorder()
getWorldBorder
in interface CollisionView
public BlockView getExistingChunk(int chunkX, int chunkZ)
getExistingChunk
in interface CollisionView
@Nullable public BlockEntity getBlockEntity(BlockPos pos)
getBlockEntity
in interface BlockView
public BlockState getBlockState(BlockPos pos)
getBlockState
in interface BlockView
public Stream<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box, Predicate<Entity> predicate)
getEntityCollisions
in interface CollisionView
public Stream<VoxelShape> getCollisions(@Nullable Entity entity, Box box, Predicate<Entity> predicate)
getCollisions
in interface CollisionView
public FluidState getFluidState(BlockPos pos)
getFluidState
in interface BlockView