Class SimpleBlockData
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.SimpleBlockData
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory for creatingSimpleBlockDatainstances. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this block can rotate.voidDeletes the block at the original location.org.bukkit.block.data.BlockDatavoidCalled after all blocks in a structure have been removed for any potential post-processing.voidbooleanrotateBlock(MovementDirection movementDirection, int times) Rotates this block in a providedMovementDirection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.api.animatedblock.IAnimatedBlockData
rotateBlock
-
Method Details
-
canRotate
public boolean canRotate()Description copied from interface:IAnimatedBlockDataChecks if this block can rotate.- Specified by:
canRotatein interfaceIAnimatedBlockData- Returns:
- True if this block can rotate.
-
rotateBlock
Description copied from interface:IAnimatedBlockDataRotates this block in a providedMovementDirection.- Specified by:
rotateBlockin interfaceIAnimatedBlockData- Parameters:
movementDirection- TheMovementDirectionto rotate this block in.times- The number times to apply the rotation.- Returns:
- True if the block was rotated.
-
putBlock
- Specified by:
putBlockin interfaceIAnimatedBlockData- Parameters:
loc- The position where the block will be placed.
-
deleteOriginalBlock
public void deleteOriginalBlock()Description copied from interface:IAnimatedBlockDataDeletes the block at the original location.- Specified by:
deleteOriginalBlockin interfaceIAnimatedBlockData
-
postProcessStructureRemoval
public void postProcessStructureRemoval()Description copied from interface:IAnimatedBlockDataCalled 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:
postProcessStructureRemovalin interfaceIAnimatedBlockData
-
getBlockData
public org.bukkit.block.data.BlockData getBlockData()
-