程序包 org.bukkit.util

# 接口 BlockTransformer

函数接口:
  这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface @Experimental public interface BlockTransformer
A BlockTransformer is used to modify blocks that are placed by structure.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  接口
  说明
  `static interface`
  `BlockTransformer.TransformationState`
  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.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull BlockState`
  `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 of `BlockData.createBlockState()` can provide even more flexibility to return the exact block state you might want to return.
    参数:
      `region` - the accessible region
      `x` - the x position of the block
      `y` - the y position of the block
      `z` - the z position of the block
      `current` - the state of the block that should be placed
      `state` - the state of this transformation.
    返回:
      the new block state