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 nl.pim16aap2.animatedarchitecture.core.api.animatedblock.IAnimatedBlock
IAnimatedBlock.TeleportMode -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.WorldGets the bukkit world this animated block exists in.@Nullable org.bukkit.entity.Entityorg.bukkit.MaterialGets the material this block is made of.Gets the previous position of this animated block.floatintgetWorld()Gets the world this animated block exists in.booleanisAlive()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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.api.animatedblock.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()- 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.- Specified by:
moveToTargetin interfaceIAnimatedBlock- Parameters:
target- The target position the block should move to.
-
isAlive
public boolean isAlive()- Specified by:
isAlivein interfaceIAnimatedBlock- Returns:
- True if this animated block is alive.
-
getAnimatedBlockData
- 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
@Nullable public @Nullable org.bukkit.entity.Entity getEntity()- Specified by:
getEntityin interfaceIAnimatedBlockSpigot
-
getLocation
- Specified by:
getLocationin interfaceIAnimatedBlock- Returns:
- 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.
-
getPosition
- Specified by:
getPositionin interfaceIAnimatedBlock- Returns:
- 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.
-
getCurrentPosition
- Specified by:
getCurrentPositionin interfaceIAnimatedBlock- Returns:
- The current position of this animated block. This value is updated after each tick/teleport.
-
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
- Specified by:
getPreviousTargetin interfaceIAnimatedBlock- Returns:
- The previous movement target.
-
getFinalPosition
- Specified by:
getFinalPositionin interfaceIAnimatedBlock- Returns:
- The position where the block will be placed after the animation finishes.
-
getRadius
public float getRadius()- 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
- 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.
-