@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public interface IColumn extends XZAddressable
| Modifier and Type | Method and Description |
|---|---|
void |
addCube(ICube cube)
Add a cube to this column
|
ICube |
getCube(int cubeY)
Retrieve the cube at the specified location
|
int |
getHeight(net.minecraft.util.math.BlockPos pos)
Return Y position of the block directly above the top non-transparent block (opacity != 0),
or a value below minimum world height of there is no top block.
|
int |
getHeightValue(int localX,
int localZ)
Deprecated.
Use
getHeightValue(int, int, int) instead |
int |
getHeightValue(int localX,
int blockY,
int localZ)
Return Y position of the block directly above the top non-transparent block,
or a value below minimum world height of there is no top block.
|
ICube |
getLoadedCube(int cubeY)
Retrieve the cube at the specified location if it is loaded.
|
java.util.Collection<? extends ICube> |
getLoadedCubes()
Retrieve all cubes in this column that are currently loaded
|
java.lang.Iterable<? extends ICube> |
getLoadedCubes(int startY,
int endY)
Iterate over all loaded cubes in this column in order.
|
IHeightMap |
getOpacityIndex() |
boolean |
hasLoadedCubes()
Check if there are any loaded cube in this column
|
void |
preCacheCube(ICube cube)
Note: this method is intended for internal use only and will be removed.
|
ICube |
removeCube(int cubeY)
Remove the cube at the specified height
|
boolean |
shouldTick()
Check if this column needs to be ticked
|
getX, getZint getHeight(net.minecraft.util.math.BlockPos pos)
pos - the position for which the height should be returned. Note that Y coordinate may not necessarily be ignored, which gives the
possibility of multiple layers/stacked dimensions@Deprecated
int getHeightValue(int localX,
int localZ)
getHeightValue(int, int, int) insteadlocalX - x coordinate relative to this chunk. Only values in range [0, ICube.SIZE) are validlocalZ - z coordinate relative to this chunk. Only values in range [0, ICube.SIZE) are validint getHeightValue(int localX,
int blockY,
int localZ)
localX - x coordinate relative to this chunk. Only values in range [0, ICube.SIZE) are validblockY - the Y for which the height should be returned. This is global world coordinate, not a local coordinate.
Note that Y coordinate may not necessarily be ignored, which gives the possibility of multiple layers/stacked dimensionslocalZ - z coordinate relative to this chunk. Only values in range [0, ICube.SIZE) are validboolean shouldTick()
true if any cube in this column needs to be ticked, false otherwiseIHeightMap getOpacityIndex()
java.util.Collection<? extends ICube> getLoadedCubes()
java.lang.Iterable<? extends ICube> getLoadedCubes(int startY, int endY)
startY < endY, order is bottom to top,
otherwise order is top to bottom.startY - initial cube y positionendY - last cube y positionstartY and endY (inclusive)@Nullable ICube getLoadedCube(int cubeY)
cubeY - cube y positionnull if it is not loadedICube getCube(int cubeY)
cubeY - cube y positionvoid addCube(ICube cube)
cube - the cube being added@Nullable ICube removeCube(int cubeY)
cubeY - cube y positionnullboolean hasLoadedCubes()
true if there is at least on loaded cube in this column, false otherwisevoid preCacheCube(ICube cube)
cube - the cube to precache