Class AnimatedBlockDisplay
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.AnimatedBlockDisplay
- All Implemented Interfaces:
IAnimatedBlock, IAnimatedBlockSpigot
Represents an animated block display. These are the blocks that the player sees moving around in the world.
-
Nested Class Summary
Nested classes/interfaces inherited from interface IAnimatedBlock
IAnimatedBlock.TeleportMode -
Method Summary
Modifier and TypeMethodDescriptionReturns the block data of this animated block.org.bukkit.WorldGets the bukkit world this animated block exists in.Returns the current position of this animated block.@Nullable org.bukkit.entity.EntityReturns the position where the block will be placed after the animation finishes.Returns the current location of this entity.org.bukkit.MaterialGets the material this block is made of.Returns the current position of this entity.Gets the previous position of this animated block.Gets the previous movement target.floatReturns the radius this animated block had in relation to the engine when the animation first started.Returns the starting position of this animated block (when it was first spawned).intReturns the number of ticks this animated block has existed for.getWorld()Gets the world this animated block exists in.booleanisAlive()Returns whether this animated block is alive.booleanisOnEdge()voidkill()Removes the entity from the world.voidmoveToTarget(RotatedPosition target) Moves this animated block to the target.voidrespawn()Respawns this animated block.voidspawn()Spawns this animated block.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAnimatedBlock
getStartX, getStartY, getStartZ
-
Method Details
-
spawn
public void spawn()Description copied from interface:IAnimatedBlockSpawns this animated block.- Specified by:
spawnin interfaceIAnimatedBlock
-
kill
public void kill()Description copied from interface:IAnimatedBlockRemoves the entity from the world.- Specified by:
killin interfaceIAnimatedBlock
-
getTicksLived
public int getTicksLived()Description copied from interface:IAnimatedBlockReturns the number of ticks this animated block has existed for.- Specified by:
getTicksLivedin interfaceIAnimatedBlock- Returns:
- The number of ticks this animated block has existed for.
-
respawn
public void respawn()Description copied from interface:IAnimatedBlockRespawns this animated block.- Specified by:
respawnin interfaceIAnimatedBlock
-
moveToTarget
Description copied from interface:IAnimatedBlockMoves this animated block to the target.The movement will be applied during the next tick.
- Specified by:
moveToTargetin interfaceIAnimatedBlock- Parameters:
target- The target position the block should move to.
-
isAlive
public boolean isAlive()Description copied from interface:IAnimatedBlockReturns whether this animated block is alive.- Specified by:
isAlivein interfaceIAnimatedBlock- Returns:
trueif this animated block is alive.
-
getAnimatedBlockData
Description copied from interface:IAnimatedBlockReturns the block data of this animated block.- Specified by:
getAnimatedBlockDatain interfaceIAnimatedBlock- Returns:
- The block data of this animated block.
-
getMaterial
public org.bukkit.Material getMaterial()Description copied from interface:IAnimatedBlockSpigotGets the material this block is made of.- Specified by:
getMaterialin interfaceIAnimatedBlockSpigot- Returns:
- The material this block is made of.
-
getEntity
public @Nullable org.bukkit.entity.Entity getEntity()- Specified by:
getEntityin interfaceIAnimatedBlockSpigot
-
getLocation
Description copied from interface:IAnimatedBlockReturns the current location of this entity.Note that this will not reflect the new location after the animated block is teleported until after the next tick.
- Specified by:
getLocationin interfaceIAnimatedBlock- Returns:
- The current location of this entity.
-
getPosition
Description copied from interface:IAnimatedBlockReturns the current position of this entity.Note that this will not reflect the new position after the animated block is teleported until after the next tick.
- Specified by:
getPositionin interfaceIAnimatedBlock- Returns:
- The current position of this entity.
-
getCurrentPosition
Description copied from interface:IAnimatedBlockReturns the current position of this animated block.This value is updated after each tick/teleport.
- Specified by:
getCurrentPositionin interfaceIAnimatedBlock- Returns:
- The current position of this animated block.
-
getPreviousPosition
Description copied from interface:IAnimatedBlockGets the previous position of this animated block.This value is updated after each tick/teleport and describes the location this animated block was at before it moved.
- Specified by:
getPreviousPositionin interfaceIAnimatedBlock- Returns:
- The previous position of this animated block.
-
getPreviousTarget
Description copied from interface:IAnimatedBlockGets the previous movement target.This value is updated after each tick/teleport and describes the target this animated block was moving towards before it moved.
- Specified by:
getPreviousTargetin interfaceIAnimatedBlock- Returns:
- The previous movement target.
-
getFinalPosition
Description copied from interface:IAnimatedBlockReturns the position where the block will be placed after the animation finishes.- Specified by:
getFinalPositionin interfaceIAnimatedBlock- Returns:
- The position where the block will be placed after the animation finishes.
-
getRadius
public float getRadius()Description copied from interface:IAnimatedBlockReturns the radius this animated block had in relation to the engine when the animation first started.- Specified by:
getRadiusin interfaceIAnimatedBlock- Returns:
- The radius this animated block had in relation to the engine when the animation first started.
-
isOnEdge
public boolean isOnEdge() -
getStartPosition
Description copied from interface:IAnimatedBlockReturns the starting position of this animated block (when it was first spawned).- Specified by:
getStartPositionin interfaceIAnimatedBlock- Returns:
- The starting position of this animated block.
-
getWorld
Description copied from interface:IAnimatedBlockGets the world this animated block exists in.- Specified by:
getWorldin interfaceIAnimatedBlock- Returns:
- The world this animated block exists in.
-
getBukkitWorld
public org.bukkit.World getBukkitWorld()Description copied from interface:IAnimatedBlockSpigotGets the bukkit world this animated block exists in.- Specified by:
getBukkitWorldin interfaceIAnimatedBlockSpigot- Returns:
- The world this animated block exists in.
-