程序包 org.bukkit.util
接口 BlockTransformer
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
A BlockTransformer is used to modify blocks that are placed by structure.
-
嵌套类概要
修饰符和类型接口说明static interface
The TransformationState allows access to the original block state and the block state of the block that was at the location of the transformation in the world before the transformation started. -
方法概要
修饰符和类型方法说明transform
(@NotNull LimitedRegion region, int x, int y, int z, @NotNull BlockState current, @NotNull BlockTransformer.TransformationState state) Transforms a block in a structure.
-
方法详细资料
-
transform
@NotNull @NotNull BlockState transform(@NotNull @NotNull LimitedRegion region, int x, int y, int z, @NotNull @NotNull BlockState current, @NotNull @NotNull BlockTransformer.TransformationState state) Transforms a block in a structure. NOTE: The usage ofBlockData.createBlockState()
can provide even more flexibility to return the exact block state you might want to return.- 参数:
region
- the accessible regionx
- the x position of the blocky
- the y position of the blockz
- the z position of the blockcurrent
- the state of the block that should be placedstate
- the state of this transformation.- 返回:
- the new block state
-