Interface AnimationRequestData.IFactory
- Enclosing class:
AnimationRequestData
@AssistedFactory
public static interface AnimationRequestData.IFactory
The factory interface for
AnimationRequestData instances.-
Method Summary
Modifier and TypeMethodDescriptionnewToggleRequestData(StructureSnapshot structureSnapshot, StructureActionCause cause, double time, boolean skipAnimation, boolean preventPerpetualMovement, Cuboid newCuboid, IPlayer responsible, AnimationType animationType, StructureActionType actionType) Creates a newAnimationRequestDatafor a toggle request.
-
Method Details
-
newToggleRequestData
AnimationRequestData newToggleRequestData(StructureSnapshot structureSnapshot, StructureActionCause cause, double time, @Assisted("animationSkipped") boolean skipAnimation, @Assisted("preventPerpetualMovement") boolean preventPerpetualMovement, Cuboid newCuboid, IPlayer responsible, AnimationType animationType, StructureActionType actionType) Creates a newAnimationRequestDatafor a toggle request.- Parameters:
structureSnapshot- A snapshot of the structure, created before the toggle. The data in this snapshot is used as ground-truth for all actions of the mover.cause- The cause of the movement.time- The duration of the animation in seconds.skipAnimation- True to skip the animation and move the blocks to their new locations immediately.preventPerpetualMovement- True to prevent perpetual movement. When perpetual movement is requested but denied via this setting, the animation will still be time-limited.newCuboid- The cuboid that described the coordinates of the structure after the animation has concluded.responsible- The player responsible for the movement.animationType- The type of animation to apply.actionType- The type of movement to apply.- Returns:
- The new
AnimationRequestData.
-