Interface IAnimatedBlockData
- All Known Implementing Classes:
SimpleBlockData
public interface IAnimatedBlockData
Represents the internal data of an animated block.
These data represent a representation of the block in the structure as it is in the world.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this block can rotate.voidDeletes the block at the original location.default voidCalled after all blocks in a structure have been removed for any potential post-processing.voiddefault booleanrotateBlock(MovementDirection movementDirection) Rotates this block in a providedMovementDirection.booleanrotateBlock(MovementDirection movementDirection, int times) Rotates this block in a providedMovementDirection.
-
Method Details
-
canRotate
boolean canRotate()Checks if this block can rotate.- Returns:
- True if this block can rotate.
-
rotateBlock
Rotates this block in a providedMovementDirection.- Parameters:
movementDirection- TheMovementDirectionto rotate this block in.- Returns:
- True if the block was rotated.
-
rotateBlock
Rotates this block in a providedMovementDirection.- Parameters:
movementDirection- TheMovementDirectionto rotate this block in.times- The number times to apply the rotation.- Returns:
- True if the block was rotated.
-
putBlock
- Parameters:
loc- The position where the block will be placed.
-
deleteOriginalBlock
void deleteOriginalBlock()Deletes the block at the original location. -
postProcessStructureRemoval
default void postProcessStructureRemoval()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.
-