@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public interface ICube extends XYZAddressable, net.minecraftforge.common.capabilities.ICapabilityProvider
| Modifier and Type | Interface and Description |
|---|---|
static class |
ICube.ForcedLoadReason |
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
Side length of a cube
|
static double |
SIZE_D |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(net.minecraft.entity.Entity entity) |
void |
addTileEntity(net.minecraft.tileentity.TileEntity tileEntity)
Add a tile entity to this cube
|
boolean |
containsBlockPos(net.minecraft.util.math.BlockPos blockPos)
Check whether a given global block position is contained in this cube
|
net.minecraft.world.biome.Biome |
getBiome(net.minecraft.util.math.BlockPos pos) |
net.minecraft.block.state.IBlockState |
getBlockState(net.minecraft.util.math.BlockPos pos)
Retrieve the block state at the specified location
|
net.minecraft.block.state.IBlockState |
getBlockState(int blockX,
int localOrBlockY,
int blockZ)
Retrieve the block state at the specified location
|
net.minecraftforge.common.capabilities.CapabilityDispatcher |
getCapabilities() |
<T extends net.minecraft.world.chunk.Chunk & IColumn> |
getColumn() |
CubePos |
getCoords() |
net.minecraft.util.ClassInheritanceMultiMap<net.minecraft.entity.Entity> |
getEntitySet()
Returns the internal entity container.
|
java.util.EnumSet<ICube.ForcedLoadReason> |
getForceLoadStatus()
Returns a set of reasons this cube is forced to remain loaded if it's forced to remain loaded,
or empty enum set if it can be unloaded.
|
int |
getLightFor(net.minecraft.world.EnumSkyBlock lightType,
net.minecraft.util.math.BlockPos pos)
Retrieve the raw light level at the specified location
|
net.minecraft.world.chunk.storage.ExtendedBlockStorage |
getStorage() |
net.minecraft.tileentity.TileEntity |
getTileEntity(net.minecraft.util.math.BlockPos pos,
net.minecraft.world.chunk.Chunk.EnumCreateEntityType createType)
Retrieve the tile entity at the specified location
|
java.util.Map<net.minecraft.util.math.BlockPos,net.minecraft.tileentity.TileEntity> |
getTileEntityMap()
Retrieve a map of positions to their respective tile entities
|
<T extends net.minecraft.world.World & ICubicWorld> |
getWorld() |
int |
getX()
Retrieve this cube's x coordinate in cube space
|
int |
getY()
Retrieve this cube's y coordinate in cube space
|
int |
getZ()
Retrieve this cube's z coordinate in cube space
|
boolean |
hasLightUpdates() |
boolean |
isCubeLoaded() |
boolean |
isEmpty()
Check if there are any non-air blocks in this cube
|
boolean |
isFullyPopulated()
Check whether this cube was fully populated, i.e.
|
boolean |
isInitialLightingDone()
Check whether this cube's initial diffuse skylight has been calculated
|
boolean |
isPopulated()
Check whether this cube was populated, i.e.
|
boolean |
isSurfaceTracked()
Gets internal isSurfaceTracked value.
|
net.minecraft.util.math.BlockPos |
localAddressToBlockPos(int localAddress)
Convert an integer-encoded address to a local block to a global block position
|
boolean |
needsSaving()
Check if any modifications happened to this cube since it was loaded from disk
|
boolean |
removeEntity(net.minecraft.entity.Entity entity) |
default void |
setBiome(int localBiomeX,
int localBiomeZ,
net.minecraft.world.biome.Biome biome)
Deprecated.
Due to changes in Minecraft 1.15.x, biome storage will be changed to 1 biome per 4x4x4 blocks. Use
setBiome(int, int, int, Biome) |
void |
setBiome(int localBiomeX,
int localBiomeY,
int localBiomeZ,
net.minecraft.world.biome.Biome biome)
Set biome at a cube-local 4x4x4 block segment.
|
net.minecraft.block.state.IBlockState |
setBlockState(net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState newstate)
Set the block state at the specified location
|
void |
setLightFor(net.minecraft.world.EnumSkyBlock lightType,
net.minecraft.util.math.BlockPos pos,
int light)
Set the raw light level at the specified location
|
static final int SIZE
static final double SIZE_D
net.minecraft.block.state.IBlockState getBlockState(net.minecraft.util.math.BlockPos pos)
pos - target locationgetBlockState(int, int, int)@Nullable
net.minecraft.block.state.IBlockState setBlockState(net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState newstate)
pos - target locationnewstate - target state of the block at that positionChunk.setBlockState(BlockPos, IBlockState)net.minecraft.block.state.IBlockState getBlockState(int blockX,
int localOrBlockY,
int blockZ)
blockX - block x positionlocalOrBlockY - block or local y positionblockZ - block z positiongetBlockState(BlockPos)int getLightFor(net.minecraft.world.EnumSkyBlock lightType,
net.minecraft.util.math.BlockPos pos)
lightType - The type of light (sky or block light)pos - The position at which light should be checkedvoid setLightFor(net.minecraft.world.EnumSkyBlock lightType,
net.minecraft.util.math.BlockPos pos,
int light)
lightType - The type of light (sky or block light)pos - The position at which light should be updatedlight - the light level@Nullable
net.minecraft.tileentity.TileEntity getTileEntity(net.minecraft.util.math.BlockPos pos,
net.minecraft.world.chunk.Chunk.EnumCreateEntityType createType)
pos - target locationcreateType - how fast the tile entity is needednull if there is no entity and
createType was not Chunk.EnumCreateEntityType#IMMEDIATEvoid addTileEntity(net.minecraft.tileentity.TileEntity tileEntity)
tileEntity - The tile entity to addboolean isEmpty()
true if this cube contains only air blocks, false otherwisenet.minecraft.util.math.BlockPos localAddressToBlockPos(int localAddress)
localAddress - the address of the block<T extends net.minecraft.world.World & ICubicWorld> T getWorld()
T - dummy generic parameter to return a type that is both World and ICubicWorld<T extends net.minecraft.world.chunk.Chunk & IColumn> T getColumn()
T - dummy generic parameter to return a type that is both Chunk and IColumnint getX()
getX in interface XYZAddressableint getY()
getY in interface XYZAddressableint getZ()
getZ in interface XYZAddressableCubePos getCoords()
boolean containsBlockPos(net.minecraft.util.math.BlockPos blockPos)
blockPos - the position of the blocktrue if the position is within this cube, false otherwise@Nullable net.minecraft.world.chunk.storage.ExtendedBlockStorage getStorage()
java.util.Map<net.minecraft.util.math.BlockPos,net.minecraft.tileentity.TileEntity> getTileEntityMap()
net.minecraft.util.ClassInheritanceMultiMap<net.minecraft.entity.Entity> getEntitySet()
void addEntity(net.minecraft.entity.Entity entity)
boolean removeEntity(net.minecraft.entity.Entity entity)
boolean needsSaving()
true if this cube should be written back to diskboolean isPopulated()
ICubeGenerator.populate(ICube). Check there for more information regarding
population.true if this cube has been populated, false otherwiseboolean isFullyPopulated()
ICubeGenerator.populate(ICube). Check there for more
information regarding populationtrue if this cube has been populated, false otherwiseboolean isSurfaceTracked()
boolean isInitialLightingDone()
true if it has been calculated, false otherwiseboolean isCubeLoaded()
boolean hasLightUpdates()
net.minecraft.world.biome.Biome getBiome(net.minecraft.util.math.BlockPos pos)
void setBiome(int localBiomeX,
int localBiomeY,
int localBiomeZ,
net.minecraft.world.biome.Biome biome)
localBiomeX - cube-local X coordinate. One unit is 4 blockslocalBiomeY - cube-local Y coordinate. One unit is 4 blockslocalBiomeZ - cube-local Z coordinate. One unit is 4 blocksbiome - biome at the given cube coordinates@Deprecated
default void setBiome(int localBiomeX,
int localBiomeZ,
net.minecraft.world.biome.Biome biome)
setBiome(int, int, int, Biome)localBiomeX - cube-local X coordinate. One unit is 2 blockslocalBiomeZ - cube-local Z coordinate. One unit is 2 blocksbiome - biome at the given cube coordinates@Nullable net.minecraftforge.common.capabilities.CapabilityDispatcher getCapabilities()
java.util.EnumSet<ICube.ForcedLoadReason> getForceLoadStatus()