java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.SimpleBlockData
All Implemented Interfaces:
IAnimatedBlockData

public class SimpleBlockData extends Object implements IAnimatedBlockData
Represents the data of a block that is animated.

This class is used to store the data of a block that is animated. These data are used to rotate the block in the direction of the animation and to place the block back in the world when the animation finishes.

  • Method Details

    • canRotate

      public boolean canRotate()
      Description copied from interface: IAnimatedBlockData
      Checks if this block can rotate.
      Specified by:
      canRotate in interface IAnimatedBlockData
      Returns:
      True if this block can rotate.
    • rotateBlock

      public boolean rotateBlock(MovementDirection movementDirection, int times)
      Description copied from interface: IAnimatedBlockData
      Rotates this block in a provided MovementDirection.
      Specified by:
      rotateBlock in interface IAnimatedBlockData
      Parameters:
      movementDirection - The MovementDirection to rotate this block in.
      times - The number times to apply the rotation.
      Returns:
      True if the block was rotated.
    • putBlock

      public void putBlock(IVector3D loc)
      Specified by:
      putBlock in interface IAnimatedBlockData
      Parameters:
      loc - The position where the block will be placed.
    • deleteOriginalBlock

      public void deleteOriginalBlock()
      Description copied from interface: IAnimatedBlockData
      Deletes the block at the original location.
      Specified by:
      deleteOriginalBlock in interface IAnimatedBlockData
    • postProcessStructureRemoval

      public void postProcessStructureRemoval()
      Description copied from interface: IAnimatedBlockData
      Called after all blocks in a structure have been removed for any potential post-processing.

      Subclasses can override this method if they need to do any post-processing, such as updating the physics around the edges of the empty space where the structure used to be.

      Specified by:
      postProcessStructureRemoval in interface IAnimatedBlockData
    • getBlockData

      public org.bukkit.block.data.BlockData getBlockData()