Package org.bukkit.util
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.
A BlockTransformer is used to modify blocks that are placed by structure.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic 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 TypeMethodDescriptiontransform
(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 ofBlockData.createBlockState()
can provide even more flexibility to return the exact block state you might want to return.- Parameters:
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.- Returns:
- the new block state
-