Interface IAnimatedBlockFactory

All Known Implementing Classes:
AnimatedBlockDisplayFactory

public interface IAnimatedBlockFactory
Represents a IFactory for IAnimatedBlock instances.
  • Method Details

    • create

      Optional<IAnimatedBlock> create(IWorld world, RotatedPosition startPosition, float radius, boolean onEdge, RotatedPosition finalPosition, @Nullable @Nullable Consumer<IAnimatedBlockData> blockDataRotator)
      Creates a new IAnimatedBlock at the given location made of the provided block.
      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.