Interface BlockTransformer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

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

    Nested Classes
    Modifier and Type
    Interface
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    transform(LimitedRegion region, int x, int y, int z, BlockState current, BlockTransformer.TransformationState state)
    Transforms a block in a structure.
  • Method Details

    • transform

      @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. NOTE: The usage of BlockData.createBlockState() can provide even more flexibility to return the exact block state you might want to return.
      Parameters:
      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.
      Returns:
      the new block state