Interface ProjectileFilter

All Superinterfaces:
Predicate<Projectile>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ProjectileFilter extends Predicate<Projectile>
Predicate for filtering Projectile entries in a GameSnapshot. Compose with Predicate.and(Predicate) / Predicate.or(Predicate).
  • Method Details

    • and

      default ProjectileFilter and(Predicate<? super Projectile> other)
      Specified by:
      and in interface Predicate<Projectile>
    • or

      default ProjectileFilter or(Predicate<? super Projectile> other)
      Specified by:
      or in interface Predicate<Projectile>
    • negate

      default ProjectileFilter negate()
      Specified by:
      negate in interface Predicate<Projectile>
    • id

      static ProjectileFilter id(int projectileId)
    • onPlane

      static ProjectileFilter onPlane(int plane)
    • fromSource

      static ProjectileFilter fromSource(int sourceIndex)
      Projectiles launched by the given source entity (NPC/player server index).
    • toTarget

      static ProjectileFilter toTarget(int targetIndex)
      Projectiles aimed at the given target entity (NPC/player server index).
    • landingAt

      static ProjectileFilter landingAt(int tileX, int tileY)
      Projectiles that will land on the given tile.
    • landingAt

      static ProjectileFilter landingAt(int tileX, int tileY, int plane)
      Projectiles that will land on the given tile and plane.
    • launchedAt

      static ProjectileFilter launchedAt(int tileX, int tileY)
      Projectiles launched from the given tile.
    • fromTile

      static ProjectileFilter fromTile()
      Projectiles anchored to a fixed tile at the source end rather than an entity.
    • toTile

      static ProjectileFilter toTile()
      Projectiles aimed at a fixed tile rather than an entity.
    • inFlightAt

      static ProjectileFilter inFlightAt(int gameCycle)
      Projectiles whose flight brackets the given game cycle — i.e. actually in the air at that moment. Pass the cycle from GameAPI.getGameCycle(); see entities.Projectile.flightProgress(int) for why the cycle is a parameter rather than read internally.