public class EntityPredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static EntityPredicate |
ANY |
private Identifier |
catType |
private DistancePredicate |
distance |
private EntityEffectPredicate |
effects |
static EntityPredicate[] |
EMPTY |
private EntityEquipmentPredicate |
equipment |
private FishingHookPredicate |
fishingHook |
private EntityFlagsPredicate |
flags |
private LocationPredicate |
location |
private NbtPredicate |
nbt |
private PlayerPredicate |
player |
private String |
team |
private EntityTypePredicate |
type |
Modifier | Constructor and Description |
---|---|
private |
EntityPredicate(EntityTypePredicate type,
DistancePredicate distance,
LocationPredicate location,
EntityEffectPredicate effects,
NbtPredicate nbt,
EntityFlagsPredicate flags,
EntityEquipmentPredicate equipment,
PlayerPredicate player,
FishingHookPredicate fishingHook,
String team,
Identifier catType) |
Modifier and Type | Method and Description |
---|---|
static EntityPredicate |
fromJson(JsonElement el) |
static EntityPredicate[] |
fromJsonArray(JsonElement element) |
static JsonElement |
serializeAll(EntityPredicate[] predicates) |
boolean |
test(ServerPlayerEntity player,
Entity entity) |
boolean |
test(ServerWorld world,
Vec3d pos,
Entity entity) |
JsonElement |
toJson() |
public static final EntityPredicate ANY
public static final EntityPredicate[] EMPTY
private final EntityTypePredicate type
private final DistancePredicate distance
private final LocationPredicate location
private final EntityEffectPredicate effects
private final NbtPredicate nbt
private final EntityFlagsPredicate flags
private final EntityEquipmentPredicate equipment
private final PlayerPredicate player
private final FishingHookPredicate fishingHook
@Nullable private final Identifier catType
private EntityPredicate(EntityTypePredicate type, DistancePredicate distance, LocationPredicate location, EntityEffectPredicate effects, NbtPredicate nbt, EntityFlagsPredicate flags, EntityEquipmentPredicate equipment, PlayerPredicate player, FishingHookPredicate fishingHook, @Nullable String team, @Nullable Identifier catType)
public boolean test(ServerPlayerEntity player, @Nullable Entity entity)
public boolean test(ServerWorld world, @Nullable Vec3d pos, @Nullable Entity entity)
public static EntityPredicate fromJson(@Nullable JsonElement el)
public static EntityPredicate[] fromJsonArray(@Nullable JsonElement element)
public JsonElement toJson()
public static JsonElement serializeAll(EntityPredicate[] predicates)