程序包 org.bukkit
接口 BlockChangeDelegate
public interface BlockChangeDelegate
一个用于处理方块改变的代理.
原文: A delegate for handling block changes. This serves as a direct interface between generation algorithms in the server implementation and utilizing code.
-
方法概要
修饰符和类型方法说明getBlockData(int x, int y, int z) 获取指定位置的方块数据.int获取世界的高度.booleanisEmpty(int x, int y, int z) 检查指定方块是否为空(空气).booleansetBlockData(int x, int y, int z, @NotNull BlockData blockData) 在指定坐标处设置方块数据.
-
方法详细资料
-
setBlockData
在指定坐标处设置方块数据.原文:Set a block data at the specified coordinates.
- 参数:
x- X 坐标y- Y 坐标z- Z 坐标blockData- 方块数据- 返回:
- 如果方块设置成功则返回 true
-
getBlockData
获取指定位置的方块数据.原文:Get the block data at the location.
- 参数:
x- X 坐标y- Y 坐标z- Z 坐标- 返回:
- 方块数据
-
getHeight
int getHeight()获取世界的高度.原文:Gets the height of the world.
- 返回:
- 世界的高度
-
isEmpty
boolean isEmpty(int x, int y, int z) 检查指定方块是否为空(空气).原文:Checks if the specified block is empty (air) or not.
- 参数:
x- X 坐标y- Y 坐标z- Z 坐标- 返回:
- 如果方块被视为空则返回 true
-