public interface Chunk
Modifier and Type | Method and Description |
---|---|
default int |
get3DBiome(int x,
int y,
int z)
Get a 3D biome, stored per 4x4x4 block.
|
default int |
getBiome(int x,
int z)
Get a 2D biome, stored per column.
|
int |
getBlockLightLevel(int x,
int y,
int z) |
int |
getBlockType(int x,
int y,
int z)
Deprecated.
|
MinecraftCoords |
getCoords() |
int |
getDataValue(int x,
int y,
int z)
Deprecated.
|
java.util.List<Entity> |
getEntities()
Get a list of entities contained in this chunk.
|
int |
getHeight(int x,
int z) |
int |
getHighestNonAirBlock()
Get the Y coordinate of the highest non-air (block ID zero, any data value) block in the chunk.
|
int |
getHighestNonAirBlock(int x,
int z)
Get the Y coordinate of the highest non-air (block ID zero, any data value) block in a specific column.
|
long |
getInhabitedTime() |
Material |
getMaterial(int x,
int y,
int z) |
int |
getMaxHeight() |
default int |
getMinHeight() |
default java.lang.String |
getNamedBiome(int x,
int y,
int z)
Get a modern biome, stored per 4x4x4 block.
|
int |
getSkyLightLevel(int x,
int y,
int z) |
java.util.List<TileEntity> |
getTileEntities()
Get a list of tile entities (also known as block entities) contained in this chunk.
|
int |
getxPos() |
int |
getzPos() |
default boolean |
is3DBiomesAvailable()
Indicates whether 3D biomes are available.
|
default boolean |
is3DBiomesSupported()
Indicates whether 3D biomes are supported.
|
default boolean |
isBiomesAvailable()
Indicates whether 2D biomes are available.
|
default boolean |
isBiomesSupported()
Indicates whether 2D biomes are supported.
|
boolean |
isLightPopulated() |
default boolean |
isNamedBiomesAvailable()
Indicates whether named biomes are available.
|
default boolean |
isNamedBiomesSupported()
Indicates whether named biomes are supported.
|
boolean |
isReadOnly() |
boolean |
isTerrainPopulated() |
default void |
markForUpdateChunk(int x,
int y,
int z)
Mark a block to be updated by Minecraft when next loaded.
|
default void |
set3DBiome(int x,
int y,
int z,
int biome)
Set a 3D biome, stored per 4x4x4 block.
|
default void |
setBiome(int x,
int z,
int biome)
Set a 2D biome, stored per column.
|
void |
setBlockLightLevel(int x,
int y,
int z,
int blockLightLevel) |
void |
setBlockType(int x,
int y,
int z,
int blockType)
Deprecated.
|
void |
setDataValue(int x,
int y,
int z,
int dataValue)
Deprecated.
|
void |
setHeight(int x,
int z,
int height) |
void |
setInhabitedTime(long inhabitedTime) |
void |
setLightPopulated(boolean lightPopulated) |
void |
setMaterial(int x,
int y,
int z,
Material material) |
default void |
setNamedBiome(int x,
int y,
int z,
java.lang.String biome)
Set a modern biome, stored per 4x4x4 block.
|
void |
setSkyLightLevel(int x,
int y,
int z,
int skyLightLevel) |
void |
setTerrainPopulated(boolean terrainPopulated) |
int getBlockLightLevel(int x, int y, int z)
void setBlockLightLevel(int x, int y, int z, int blockLightLevel)
@Deprecated int getBlockType(int x, int y, int z)
getMaterial(int, int, int)
@Deprecated void setBlockType(int x, int y, int z, int blockType)
setMaterial(int, int, int, Material)
@Deprecated int getDataValue(int x, int y, int z)
getMaterial(int, int, int)
@Deprecated void setDataValue(int x, int y, int z, int dataValue)
setMaterial(int, int, int, Material)
int getHeight(int x, int z)
void setHeight(int x, int z, int height)
int getSkyLightLevel(int x, int y, int z)
void setSkyLightLevel(int x, int y, int z, int skyLightLevel)
int getxPos()
int getzPos()
MinecraftCoords getCoords()
boolean isTerrainPopulated()
void setTerrainPopulated(boolean terrainPopulated)
Material getMaterial(int x, int y, int z)
void setMaterial(int x, int y, int z, Material material)
java.util.List<Entity> getEntities()
java.util.List<TileEntity> getTileEntities()
default int getMinHeight()
int getMaxHeight()
default boolean isBiomesSupported()
getBiome(int, int)
and setBiome(int, int, int)
.
The default implementation returns false
.
default boolean isBiomesAvailable()
getBiome(int, int)
and setBiome(int, int, int)
.
The default implementation returns false
.
default boolean is3DBiomesSupported()
get3DBiome(int, int, int)
and
set3DBiome(int, int, int, int)
.
The default implemenation returns false
.
default boolean is3DBiomesAvailable()
get3DBiome(int, int, int)
and
set3DBiome(int, int, int, int)
.
The default implemenation returns false
.
default boolean isNamedBiomesSupported()
getNamedBiome(int, int, int)
and
setNamedBiome(int, int, int, String)
.
The default implementation returns false
.
default boolean isNamedBiomesAvailable()
getNamedBiome(int, int, int)
and
setNamedBiome(int, int, int, String)
.
The default implementation returns false
.
default int getBiome(int x, int z)
UnsupportedOperationException
when invoked on a format which
does not support 2D biomes.default void setBiome(int x, int z, int biome)
UnsupportedOperationException
when invoked on a format which
does not support 2D biomes.default int get3DBiome(int x, int y, int z)
UnsupportedOperationException
when invoked on a format which does not support 3D biomes.default void set3DBiome(int x, int y, int z, int biome)
UnsupportedOperationException
when invoked on a format which does not support 3D biomes.default java.lang.String getNamedBiome(int x, int y, int z)
UnsupportedOperationException
when invoked on a format which does not support modern
biomes.default void setNamedBiome(int x, int y, int z, java.lang.String biome)
UnsupportedOperationException
when invoked on a format which does not support named
biomes.default void markForUpdateChunk(int x, int y, int z)
The default implementation does nothing.
boolean isReadOnly()
boolean isLightPopulated()
void setLightPopulated(boolean lightPopulated)
long getInhabitedTime()
void setInhabitedTime(long inhabitedTime)
int getHighestNonAirBlock(int x, int z)
x
- The X coordinate of the column relative to the chunk.z
- The Z coordinate of the column relative to the chunk.Integer.MIN_VALUE
if the column is empty.int getHighestNonAirBlock()
Integer.MIN_VALUE
if the chunk is empty.