public class EntityPredicate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
allowInvulnerable |
private java.util.function.Predicate<LivingEntity> |
customPredicate |
static EntityPredicate |
DEFAULT |
private double |
distance |
private boolean |
friendlyFire |
private boolean |
requireLineOfSight |
private boolean |
skipAttackChecks |
private boolean |
useVisibilityModifier |
Constructor and Description |
---|
EntityPredicate() |
Modifier and Type | Method and Description |
---|---|
EntityPredicate |
allowFriendlyFire() |
EntityPredicate |
allowInvulnerable() |
boolean |
canTarget(LivingEntity attacker,
LivingEntity target) |
EntityPredicate |
setCustomPredicate(java.util.function.Predicate<LivingEntity> p_221012_1_) |
EntityPredicate |
setDistance(double distanceIn) |
EntityPredicate |
setLineOfSiteRequired() |
EntityPredicate |
setSkipAttackChecks() |
EntityPredicate |
setUseInvisibilityCheck() |
public static final EntityPredicate DEFAULT
private double distance
private boolean allowInvulnerable
private boolean friendlyFire
private boolean requireLineOfSight
private boolean skipAttackChecks
private boolean useVisibilityModifier
private java.util.function.Predicate<LivingEntity> customPredicate
public EntityPredicate setDistance(double distanceIn)
public EntityPredicate allowInvulnerable()
public EntityPredicate allowFriendlyFire()
public EntityPredicate setLineOfSiteRequired()
public EntityPredicate setSkipAttackChecks()
public EntityPredicate setUseInvisibilityCheck()
public EntityPredicate setCustomPredicate(@Nullable java.util.function.Predicate<LivingEntity> p_221012_1_)
public boolean canTarget(@Nullable LivingEntity attacker, LivingEntity target)