Interface ShulkerBullet

All Superinterfaces:
Audience, CommandSender, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, Pointered, Projectile, ServerOperator, Sound.Emitter

public interface ShulkerBullet extends Projectile
  • Method Details

    • getTarget

      Retrieve the target of this bullet.
      Returns:
      the targeted entity
    • setTarget

      void setTarget(@Nullable @Nullable Entity target)
      Sets the target of this bullet
      Parameters:
      target - the entity to target
    • getTargetDelta

      @NotNull Vector getTargetDelta()
      Gets the relative offset that this shulker bullet should move towards, note that this will change each tick as the skulker bullet approaches the target.
      Returns:
      target delta offset
    • setTargetDelta

      void setTargetDelta(@NotNull Vector vector)
      Sets the relative offset that this shulker bullet should move towards, note that this will change each tick as the skulker bullet approaches the target. This is usually relative towards their target.
      Parameters:
      vector - target
    • getCurrentMovementDirection

      @Nullable BlockFace getCurrentMovementDirection()
      Gets the current movement direction. This is used to determine the next movement direction to ensure that the bullet does not move in the same direction.
      Returns:
      null or their current direction
    • setCurrentMovementDirection

      void setCurrentMovementDirection(@Nullable BlockFace movementDirection)
      Set the current movement direction. This is used to determine the next movement direction to ensure that the bullet does not move in the same direction. Set to null to simply pick a random direction.
      Parameters:
      movementDirection - null or a direction
    • getFlightSteps

      int getFlightSteps()
      Gets how many ticks this shulker bullet will attempt to move in its current direction.
      Returns:
      number of steps
    • setFlightSteps

      void setFlightSteps(int steps)
      Sets how many ticks this shulker bullet will attempt to move in its current direction.
      Parameters:
      steps - number of steps