Class AnimatedHighlightedBlock
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.animatedblock.AnimatedHighlightedBlock
- All Implemented Interfaces:
IAnimatedBlock
An
IAnimatedBlock that represents a highlighted block. This block can be used to highlight a block in the
world for a player. Usage of this block will not result in any changes to the world.-
Nested Class Summary
Nested classes/interfaces inherited from interface IAnimatedBlock
IAnimatedBlock.TeleportMode -
Constructor Summary
ConstructorsConstructorDescriptionAnimatedHighlightedBlock(ILocationFactory locationFactory, HighlightedBlockSpawner highlightedBlockSpawner, IWorld world, IPlayer player, RotatedPosition position, float startRadius, Color color) -
Method Summary
Modifier and TypeMethodDescriptionReturns the block data of this animated block.Returns the current position of this animated block.Returns the position where the block will be placed after the animation finishes.Returns the current location of this entity.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.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
-
Constructor Details
-
AnimatedHighlightedBlock
public AnimatedHighlightedBlock(ILocationFactory locationFactory, HighlightedBlockSpawner highlightedBlockSpawner, IWorld world, IPlayer player, RotatedPosition position, float startRadius, Color color)
-
-
Method Details
-
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.
-
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.
-
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.
-
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.
-
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
-
respawn
public void respawn()Description copied from interface:IAnimatedBlockRespawns this animated block.- Specified by:
respawnin 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.
-
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.
-
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.
-
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.
-