Class AnimatedBlockDisplayFactory
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.AnimatedBlockDisplayFactory
- All Implemented Interfaces:
IAnimatedBlockFactory
Implementation of
IAnimatedBlockFactory for the Spigot platform.-
Method Summary
Modifier and TypeMethodDescriptioncreate(IWorld world, RotatedPosition startPosition, float radius, boolean onEdge, RotatedPosition finalPosition, @Nullable Consumer<IAnimatedBlockData> blockDataRotator) Creates a newIAnimatedBlockat the given location made of the provided block.
-
Method Details
-
create
public Optional<IAnimatedBlock> create(IWorld world, RotatedPosition startPosition, float radius, boolean onEdge, RotatedPosition finalPosition, @Nullable @Nullable Consumer<IAnimatedBlockData> blockDataRotator) Description copied from interface:IAnimatedBlockFactoryCreates a newIAnimatedBlockat the given location made of the provided block.- Specified by:
createin interfaceIAnimatedBlockFactory- Parameters:
world- The world in which the animated block exists.startPosition- The starting position of the animated block.radius- The radius of the block to the rotation point.onEdge- True if this animated block is on the edge of the cuboid being animated.finalPosition- The final position of the block. This is the place where the block will be placed after the animation finishes.blockDataRotator- The consumer used to rotate the block data of the animated block. May be null to disable this.- Returns:
- The
IAnimatedBlockthat was constructed if it could be constructed.
-