接口 ChunkGenerator.ChunkData
- 封闭类:
- ChunkGenerator
public static interface ChunkGenerator.ChunkData
Data for a Chunk.
-
方法概要
修饰符和类型方法说明byte
getData
(int x, int y, int z) 已过时。Uses magic valuesint
Get the maximum height for the chunk.getType
(int x, int y, int z) Get the type of the block at x, y, z.getTypeAndData
(int x, int y, int z) Get the type and data of the block at x, y ,z.int
getTypeId
(int x, int y, int z) 已过时。Uses magic valuesvoid
setBlock
(int x, int y, int z, int blockId) 已过时。Uses magic valuesvoid
setBlock
(int x, int y, int z, int blockId, byte data) 已过时。Uses magic valuesvoid
Set the block at x,y,z in the chunk data to material.void
setBlock
(int x, int y, int z, MaterialData material) Set the block at x,y,z in the chunk data to material.void
setRegion
(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId) 已过时。Uses magic values.void
setRegion
(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId, int data) 已过时。Uses magic values.void
Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material.void
setRegion
(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material) Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material.
-
方法详细资料
-
getMaxHeight
int getMaxHeight()Get the maximum height for the chunk. Setting blocks at or above this height will do nothing.- 返回:
- the maximum height
-
setBlock
Set the block at x,y,z in the chunk data to material. Note: setting blocks outside the chunk's bounds does nothing.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusivematerial
- the type to set the block to
-
setBlock
Set the block at x,y,z in the chunk data to material. Setting blocks outside the chunk's bounds does nothing.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusivematerial
- the type to set the block to
-
setRegion
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
- minimum x location (inclusive) in the chunk to setyMin
- minimum y location (inclusive) in the chunk to setzMin
- minimum z location (inclusive) in the chunk to setxMax
- maximum x location (exclusive) in the chunk to setyMax
- maximum y location (exclusive) in the chunk to setzMax
- maximum z location (exclusive) in the chunk to setmaterial
- the type to set the blocks to
-
setRegion
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
- minimum x location (inclusive) in the chunk to setyMin
- minimum y location (inclusive) in the chunk to setzMin
- minimum z location (inclusive) in the chunk to setxMax
- maximum x location (exclusive) in the chunk to setyMax
- maximum y location (exclusive) in the chunk to setzMax
- maximum z location (exclusive) in the chunk to setmaterial
- the type to set the blocks to
-
getType
Get the type of the block at x, y, z. Getting blocks outside the chunk's bounds returns air.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusive- 返回:
- the type of the block or Material.AIR if x, y or z are outside the chunk's bounds
-
getTypeAndData
Get the type and data of the block at x, y ,z. Getting blocks outside the chunk's bounds returns air.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusive- 返回:
- the type and data of the block or the MaterialData for air if x, y or z are outside the chunk's bounds
-
setRegion
已过时。Uses magic values.Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to block id. Setting blocks outside the chunk's bounds does nothing.- 参数:
xMin
- minimum x location (inclusive) in the chunk to setyMin
- minimum y location (inclusive) in the chunk to setzMin
- minimum z location (inclusive) in the chunk to setxMax
- maximum x location (exclusive) in the chunk to setyMax
- maximum y location (exclusive) in the chunk to setzMax
- maximum z location (exclusive) in the chunk to setblockId
- the block id to set the blocks to
-
setRegion
@Deprecated void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId, int data) 已过时。Uses magic values.Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to block id and data. Setting blocks outside the chunk's bounds does nothing.- 参数:
xMin
- minimum x location (inclusive) in the chunk to setyMin
- minimum y location (inclusive) in the chunk to setzMin
- minimum z location (inclusive) in the chunk to setxMax
- maximum x location (exclusive) in the chunk to setyMax
- maximum y location (exclusive) in the chunk to setzMax
- maximum z location (exclusive) in the chunk to setblockId
- the block id to set the blocks todata
- the block data to set the blocks to
-
setBlock
已过时。Uses magic valuesSet the block at x,y,z in the chunk data to blockId. Setting blocks outside the chunk's bounds does nothing.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusiveblockId
- the blockId to set the block to
-
setBlock
已过时。Uses magic valuesSet the block at x,y,z in the chunk data to blockId. Setting blocks outside the chunk's bounds does nothing.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusiveblockId
- the blockId to set the block todata
- the block data to set the block to
-
getTypeId
已过时。Uses magic valuesGet the blockId at x,y,z in the chunk data. Getting blocks outside the chunk's bounds returns 0.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusive- 返回:
- the block id or 0 if x, y or z are outside the chunk's bounds
-
getData
已过时。Uses magic valuesGet the block data at x,y,z in the chunk data. Getting blocks outside the chunk's bounds returns 0.- 参数:
x
- the x location in the chunk from 0-15 inclusivey
- the y location in the chunk from 0 (inclusive) - maxHeight (exclusive)z
- the z location in the chunk from 0-15 inclusive- 返回:
- the block data value or air if x, y or z are outside the chunk's bounds
-