Class PartTransformEvent

java.lang.Object
alexiil.mc.lib.multipart.api.event.MultipartEvent
alexiil.mc.lib.multipart.api.event.PartTransformEvent
Direct Known Subclasses:
PartTransformEvent.Mirror, PartTransformEvent.Rotate

public class PartTransformEvent extends MultipartEvent
Indicates that the given part, along with all other parts in the multipart block, are being transformed by the given transformation.

This transformation can represent any kind of axis-aligned rotation or mirror, not being confined to just BlockRotation or BlockMirror which have no effect on the y-axis. However, there are sub-events for when the transformation is specifically equivalent to either a BlockRotation or a BlockMirror.

Transformations can be applied to this part's block via AbstractBlock.AbstractBlockState.mirror(BlockMirror), AbstractBlock.AbstractBlockState.rotate(BlockRotation), net.minecraft.block.entity.BlockEntity#applyRotation(BlockRotation), net.minecraft.block.entity.BlockEntity#applyMirror(BlockMirror), net.minecraft.block.entity.BlockEntity#applyTransformation(DirectionTransformation).

See Also: