Class PartTransformEvent
- Direct Known Subclasses:
PartTransformEvent.Mirror,PartTransformEvent.Rotate
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).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a transformation event for only a simpleBlockMirror.static classRepresents a transformation event for only a simpleBlockRotation. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PartTransformEventcreate(DirectionTransformation transformation) Constructs the correct subclass for the given transformation.
-
Field Details
-
transformation
-
-
Method Details
-
create
Constructs the correct subclass for the given transformation.If the given transformation can be represented as an equivalent
BlockRotation, then aPartTransformEvent.Rotateevent is returned. If the given transformation can be represented as an equivalentBlockMirror, then aPartTransformEvent.Mirrorevent is returned. If the given transformation cannot be represented as either aBlockRotationor aBlockMirrorthen only a basePartTransformEventis returned.
-