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.
Predicate for filtering
Projectile entries in a GameSnapshot.
Compose with Predicate.and(Predicate) / Predicate.or(Predicate).-
Method Summary
Modifier and TypeMethodDescriptiondefault ProjectileFilterand(Predicate<? super Projectile> other) static ProjectileFilterfromSource(int sourceIndex) Projectiles launched by the given source entity (NPC/player server index).static ProjectileFilterfromTile()Projectiles anchored to a fixed tile at the source end rather than an entity.static ProjectileFilterid(int projectileId) static ProjectileFilterinFlightAt(int gameCycle) Projectiles whose flight brackets the given game cycle — i.e.static ProjectileFilterlandingAt(int tileX, int tileY) Projectiles that will land on the given tile.static ProjectileFilterlandingAt(int tileX, int tileY, int plane) Projectiles that will land on the given tile and plane.static ProjectileFilterlaunchedAt(int tileX, int tileY) Projectiles launched from the given tile.default ProjectileFilternegate()static ProjectileFilteronPlane(int plane) default ProjectileFilteror(Predicate<? super Projectile> other) static ProjectileFiltertoTarget(int targetIndex) Projectiles aimed at the given target entity (NPC/player server index).static ProjectileFiltertoTile()Projectiles aimed at a fixed tile rather than an entity.
-
Method Details
-
and
- Specified by:
andin interfacePredicate<Projectile>
-
or
- Specified by:
orin interfacePredicate<Projectile>
-
negate
- Specified by:
negatein interfacePredicate<Projectile>
-
id
-
onPlane
-
fromSource
Projectiles launched by the given source entity (NPC/player server index). -
toTarget
Projectiles aimed at the given target entity (NPC/player server index). -
landingAt
Projectiles that will land on the given tile. -
landingAt
Projectiles that will land on the given tile and plane. -
launchedAt
Projectiles launched from the given tile. -
fromTile
Projectiles anchored to a fixed tile at the source end rather than an entity. -
toTile
Projectiles aimed at a fixed tile rather than an entity. -
inFlightAt
Projectiles whose flight brackets the given game cycle — i.e. actually in the air at that moment. Pass the cycle fromGameAPI.getGameCycle(); seeentities.Projectile.flightProgress(int)for why the cycle is a parameter rather than read internally.
-