Class HighlightedBlockSpawner.Builder
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.HighlightedBlockSpawner.Builder
- Enclosing class:
HighlightedBlockSpawner
The default builder implementation for highlighted blocks.
-
Method Summary
Modifier and TypeMethodDescriptionatLocation(ILocation location) atPosition(double x, double y, double z) Sets the x, y, and z coordinates to spawn the highlighted block at.atPosition(RotatedPosition rotatedPosition) Sets the rotation components of the highlighted block.atPosition(IVector3D position) forDuration(@Nullable Duration duration) spawn()Creates and spawns the new highlighted block using the provided configuration.withRotation(double x, double y, double z) Sets the rotation components of the highlighted block.withRotation(IVector3D rotation) Sets the rotation components of the highlighted block.
-
Method Details
-
forPlayer
- Parameters:
player- The player who will see the highlighted block.
-
atLocation
- Parameters:
location- The location where the highlighted block will be spawned. This sets the coordinates and the world.
-
inWorld
- Parameters:
world- The world the highlighted block will be spawned in.
-
forDuration
- Parameters:
duration- The amount of time the highlighted block should exist for after it has been spawned.
-
atPosition
- Parameters:
position- The position to spawn the highlighted block at. This only sets the coordinates; not the world.
-
atPosition
Sets the x, y, and z coordinates to spawn the highlighted block at. -
withRotation
Sets the rotation components of the highlighted block. -
withRotation
Sets the rotation components of the highlighted block. -
atPosition
Sets the rotation components of the highlighted block. -
withColor
- Parameters:
color- The color of the highlighted block.
-
spawn
Creates and spawns the new highlighted block using the provided configuration.- Returns:
- The
IHighlightedBlockthat was spawned. The optional will be empty if it could not be spawned for some reason.
-