Class AnimatedBlockDisplayFactory

java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.AnimatedBlockDisplayFactory
All Implemented Interfaces:
IAnimatedBlockFactory

@Singleton public class AnimatedBlockDisplayFactory extends Object implements IAnimatedBlockFactory
Implementation of IAnimatedBlockFactory for the Spigot platform.
  • Method Details

    • create

      public Optional<IAnimatedBlock> create(IWorld world, RotatedPosition startPosition, float radius, boolean onEdge, RotatedPosition finalPosition, @Nullable Consumer<IAnimatedBlockData> blockDataRotator)
      Description copied from interface: IAnimatedBlockFactory
      Creates a new IAnimatedBlock at the given location made of the provided block.
      Specified by:
      create in interface IAnimatedBlockFactory
      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 IAnimatedBlock that was constructed if it could be constructed.