接口 ChunkGenerator.ChunkData
- 封闭类:
- ChunkGenerator
-
方法概要
修饰符和类型方法说明getBiome(int x, int y, int z) 获取在区块内x, z位置的生物群系.getBlockData(int x, int y, int z) 获取x, y, z位置的方块数据.bytegetData(int x, int y, int z) 已过时。使用魔法值int获取此ChunkData的最大高度.int获取此ChunkData的最小高度.getType(int x, int y, int z) 获取x, y, z位置的方块类型.getTypeAndData(int x, int y, int z) 获取x, y, z位置的方块类型和数据.void将区块数据中x,y,z位置的方块设置为指定方块数据.void将区块数据中x,y,z位置的方块设置为指定材质.voidsetBlock(int x, int y, int z, @NotNull MaterialData material) 将区块数据中x,y,z位置的方块设置为指定材质.void将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.void将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.voidsetRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull MaterialData material) 将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.
-
方法详细资料
-
getMinHeight
int getMinHeight()获取此ChunkData的最小高度.原文: Get the minimum height for this ChunkData.
It is not guaranteed that this method will return the same value as
WorldInfo.getMinHeight().Setting blocks below this height will do nothing.
- 返回:
- 最小高度
-
getMaxHeight
int getMaxHeight()获取此ChunkData的最大高度.原文: Get the maximum height for this ChunkData.
It is not guaranteed that this method will return the same value as
WorldInfo.getMaxHeight().Setting blocks at or above this height will do nothing.
- 返回:
- 最大高度
-
getBiome
获取在区块内x, z位置的生物群系.原文: Get biome at x, z within chunk being generated
- 参数:
x- - 0-15y- - 世界最小高度(包含) - 世界最大高度(不包含)z- - 0-15- 返回:
- 生物群系值
-
setBlock
将区块数据中x,y,z位置的方块设置为指定材质.原文: Set the block at x,y,z in the chunk data to material. Note: setting blocks outside the chunk's bounds does nothing.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)material- 要设置的方块类型
-
setBlock
将区块数据中x,y,z位置的方块设置为指定材质.原文: Set the block at x,y,z in the chunk data to material. Setting blocks outside the chunk's bounds does nothing.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)material- 要设置的方块类型
-
setBlock
将区块数据中x,y,z位置的方块设置为指定方块数据.原文: Set the block at x,y,z in the chunk data to material. Setting blocks outside the chunk's bounds does nothing.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)blockData- 要设置的方块数据
-
setRegion
void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull Material material) 将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.原文: Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
- 参数:
xMin- 要设置的区块中最小x位置(包含)yMin- 要设置的区块中最小y位置(包含)zMin- 要设置的区块中最小z位置(包含)xMax- 要设置的区块中最大x位置(不包含)yMax- 要设置的区块中最大y位置(不包含)zMax- 要设置的区块中最大z位置(不包含)material- 要设置的方块类型
-
setRegion
void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull MaterialData material) 将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.原文: Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
- 参数:
xMin- 要设置的区块中最小x位置(包含)yMin- 要设置的区块中最小y位置(包含)zMin- 要设置的区块中最小z位置(包含)xMax- 要设置的区块中最大x位置(不包含)yMax- 要设置的区块中最大y位置(不包含)zMax- 要设置的区块中最大z位置(不包含)material- 要设置的方块类型
-
setRegion
void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull @NotNull BlockData blockData) 将区块中从xMin, yMin, zMin(包含)到xMax, yMax, zMax(不包含)的区域设置为指定材质.原文: Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. Setting blocks outside the chunk's bounds does nothing.
- 参数:
xMin- 要设置的区块中最小x位置(包含)yMin- 要设置的区块中最小y位置(包含)zMin- 要设置的区块中最小z位置(包含)xMax- 要设置的区块中最大x位置(不包含)yMax- 要设置的区块中最大y位置(不包含)zMax- 要设置的区块中最大z位置(不包含)material- 要设置的方块类型
-
getType
获取x, y, z位置的方块类型.原文: Get the type of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)- 返回:
- 方块的类型,如果x, y或z超出区块边界则返回Material.AIR
-
getTypeAndData
获取x, y, z位置的方块类型和数据.原文: Get the type and data of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)- 返回:
- 方块的类型和数据,如果x, y或z超出区块边界则返回空气的MaterialData
-
getBlockData
获取x, y, z位置的方块数据.原文: Get the type and data of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)- 返回:
- 方块的数据,如果x, y或z超出区块边界则返回空气的BlockData
-
getData
已过时。使用魔法值获取区块数据中x,y,z位置的方块数据.原文: Get the block data at x,y,z in the chunk data. Getting blocks outside the chunk's bounds returns 0.
- 参数:
x- 区块中的x位置,范围0-15(包含)y- 区块中的y位置,范围从最小高度(包含)到最大高度(不包含)z- 区块中的z位置,范围0-15(包含)- 返回:
- 方块的数据值,如果x, y或z超出区块边界则返回空气
-