Interface IStructureWithBlocksToMove

All Superinterfaces:
IPropertyHolder, IPropertyHolderConst

public interface IStructureWithBlocksToMove extends IPropertyHolder
Describes a type of structure that moves in a straight line, where the final position of each block in a structure after an animation can be calculated by adding or subtracting the same 'distance' value (measured in blocks as integer value) to its starting position. The dimension(s) along which this is applied is up to the structure type itself to define.

An example of a structure type with discrete movement is a portcullis, as that only goes straight up and straight down.

  • Method Details

    • getBlocksToMove

      default int getBlocksToMove()
      Get the number of blocks this structure will try to move. As explained at setBlocksToMove(int), the structure is not guaranteed to move as far as specified.
      Returns:
      The number of blocks the structure will try to move.
    • setBlocksToMove

      default IPropertyValue<Integer> setBlocksToMove(int blocksToMove)
      Change the number of blocks this structure will try to move when opened. Note that this is only a suggestion. It will never move more blocks than possible. Values less than 1 will use the default value for this Structure.
      Parameters:
      blocksToMove - The number of blocks the structure will try to move.
      Returns:
      The previous property value of the open status property.