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
Modifier and TypeClassDescriptionstatic class
Represents a transformation event for only a simpleBlockMirror
.static class
Represents a transformation event for only a simpleBlockRotation
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PartTransformEvent
create
(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.Rotate
event is returned. If the given transformation can be represented as an equivalentBlockMirror
, then aPartTransformEvent.Mirror
event is returned. If the given transformation cannot be represented as either aBlockRotation
or aBlockMirror
then only a basePartTransformEvent
is returned.
-