@MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault public interface ICubicWorld extends IMinMaxHeight
| Modifier and Type | Interface and Description |
|---|---|
static class |
ICubicWorld.SurfaceType |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canBeTopBlock(net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
ICubicWorld.SurfaceType type) |
default net.minecraft.util.math.BlockPos |
findTopBlock(net.minecraft.util.math.BlockPos start,
int minTopY,
int maxTopY,
java.util.function.BiPredicate<net.minecraft.util.math.BlockPos,net.minecraft.block.state.IBlockState> canBeTopBlock)
Finds the top block between minTopY and maxTopY, startiung the search at start.
|
default net.minecraft.util.math.BlockPos |
findTopBlock(net.minecraft.util.math.BlockPos start,
int minTopY,
int maxTopY,
ICubicWorld.SurfaceType type) |
int |
getActualHeight()
Return the actual world height for this world.
|
ICubeProvider |
getCubeCache()
Returns the
ICubeProvider for this world, or throws NotCubicChunksWorldException
if this is not a CubicChunks world. |
ICube |
getCubeFromBlockCoords(net.minecraft.util.math.BlockPos pos) |
default ICube |
getCubeFromCubeCoords(CubePos pos) |
ICube |
getCubeFromCubeCoords(int cubeX,
int cubeY,
int cubeZ) |
int |
getEffectiveHeight(int blockX,
int blockZ) |
int |
getMaxGenerationHeight() |
int |
getMinGenerationHeight() |
default net.minecraft.util.math.BlockPos |
getSurfaceForCube(CubePos pos,
int xOffset,
int zOffset,
int forcedAdditionalCubes,
java.util.function.BiPredicate<net.minecraft.util.math.BlockPos,net.minecraft.block.state.IBlockState> canBeTopBlock) |
default net.minecraft.util.math.BlockPos |
getSurfaceForCube(CubePos cubePos,
int xOffset,
int zOffset,
int forcedAdditionalCubes,
ICubicWorld.SurfaceType type)
Finds the top block for that population cube with given offset, or null if no suitable place found.
|
boolean |
isBlockColumnLoaded(net.minecraft.util.math.BlockPos pos) |
boolean |
isBlockColumnLoaded(net.minecraft.util.math.BlockPos pos,
boolean allowEmpty) |
boolean |
isCubicWorld() |
default boolean |
testForCubes(net.minecraft.util.math.BlockPos centerPos,
int blockRadius,
java.util.function.Predicate<ICube> test)
Returns true iff the given Predicate evaluates to true for all cubes for block positions within blockRadius from
centerPos.
|
boolean |
testForCubes(CubePos start,
CubePos end,
java.util.function.Predicate<? super ICube> test)
Returns true iff the given Predicate evaluates to true for given cube and neighbors.
|
default boolean |
testForCubes(int minBlockX,
int minBlockY,
int minBlockZ,
int maxBlockX,
int maxBlockY,
int maxBlockZ,
java.util.function.Predicate<ICube> test)
Returns true iff the given Predicate evaluates to true for all cubes for block positions between
BlockPos(minBlockX, minBlockY, minBlockZ) and BlockPos(maxBlockX, maxBlockY, maxBlockZ) (including the specified
positions).
|
getMaxHeight, getMinHeightboolean isCubicWorld()
ICubeProvider getCubeCache()
ICubeProvider for this world, or throws NotCubicChunksWorldException
if this is not a CubicChunks world.default net.minecraft.util.math.BlockPos getSurfaceForCube(CubePos cubePos, int xOffset, int zOffset, int forcedAdditionalCubes, ICubicWorld.SurfaceType type)
cubePos - cube position to find surface forxOffset - x coordinate of population area offset relative to cube originzOffset - z coordinate of population area offset relative to cube originforcedAdditionalCubes - amount of additional cubes above to scantype - surface type@Nullable default net.minecraft.util.math.BlockPos getSurfaceForCube(CubePos pos, int xOffset, int zOffset, int forcedAdditionalCubes, java.util.function.BiPredicate<net.minecraft.util.math.BlockPos,net.minecraft.block.state.IBlockState> canBeTopBlock)
@Nullable
default net.minecraft.util.math.BlockPos findTopBlock(net.minecraft.util.math.BlockPos start,
int minTopY,
int maxTopY,
ICubicWorld.SurfaceType type)
@Nullable
default net.minecraft.util.math.BlockPos findTopBlock(net.minecraft.util.math.BlockPos start,
int minTopY,
int maxTopY,
java.util.function.BiPredicate<net.minecraft.util.math.BlockPos,net.minecraft.block.state.IBlockState> canBeTopBlock)
start - start positionminTopY - minimum Y coordinate to searchmaxTopY - maximum Y coordinate to consider as a surfacecanBeTopBlock - checks whether a block at given position should be considered "surface".default boolean canBeTopBlock(net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
ICubicWorld.SurfaceType type)
default boolean testForCubes(net.minecraft.util.math.BlockPos centerPos,
int blockRadius,
java.util.function.Predicate<ICube> test)
centerPos - position to start atblockRadius - radius in block to test, starting from centerPostest - the test to applydefault boolean testForCubes(int minBlockX,
int minBlockY,
int minBlockZ,
int maxBlockX,
int maxBlockY,
int maxBlockZ,
java.util.function.Predicate<ICube> test)
minBlockX - minimum block x coordinateminBlockY - minimum block y coordinateminBlockZ - minimum block z coordinatemaxBlockX - maximum block x coordinatemaxBlockY - maximum block y coordinatemaxBlockZ - maximum block z coordinatetest - the test to applyboolean testForCubes(CubePos start, CubePos end, java.util.function.Predicate<? super ICube> test)
start - start cube positionend - end cube positiontest - the test to applyint getActualHeight()
ICube getCubeFromCubeCoords(int cubeX, int cubeY, int cubeZ)
ICube getCubeFromBlockCoords(net.minecraft.util.math.BlockPos pos)
int getEffectiveHeight(int blockX,
int blockZ)
boolean isBlockColumnLoaded(net.minecraft.util.math.BlockPos pos)
boolean isBlockColumnLoaded(net.minecraft.util.math.BlockPos pos,
boolean allowEmpty)
int getMinGenerationHeight()
int getMaxGenerationHeight()