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 nl.pim16aap2.animatedarchitecture.core.api.animatedblock.IAnimatedBlock
IAnimatedBlock.TeleportMode -
Constructor Summary
ConstructorsConstructorDescriptionAnimatedHighlightedBlock(ILocationFactory locationFactory, HighlightedBlockSpawner highlightedBlockSpawner, IWorld world, IPlayer player, RotatedPosition position, float startRadius, Color color) -
Method Summary
Modifier and TypeMethodDescriptionGets the previous position of this animated block.floatintgetWorld()Gets the world this animated block exists in.booleanisAlive()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
-
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()- 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.
-
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.
-
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.
-
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.
-
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()- Specified by:
getTicksLivedin interfaceIAnimatedBlock- Returns:
- The number of ticks this animated block has existed for.
-
getStartPosition
- Specified by:
getStartPositionin interfaceIAnimatedBlock- Returns:
- The starting position of this animated block.
-
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.
-
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.
-