public class EntityFlagsPredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityFlagsPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static EntityFlagsPredicate |
ANY |
private Boolean |
isBaby |
private Boolean |
isOnFire |
private Boolean |
isSneaking |
private Boolean |
isSprinting |
private Boolean |
isSwimming |
Constructor and Description |
---|
EntityFlagsPredicate(Boolean isOnFire,
Boolean isSneaking,
Boolean isSprinting,
Boolean isSwimming,
Boolean isBaby) |
Modifier and Type | Method and Description |
---|---|
static EntityFlagsPredicate |
fromJson(JsonElement json) |
private static Boolean |
nullableBooleanFromJson(JsonObject json,
String key) |
private void |
nullableBooleanToJson(JsonObject json,
String key,
Boolean value) |
boolean |
test(Entity entity) |
JsonElement |
toJson() |
public static final EntityFlagsPredicate ANY
public boolean test(Entity entity)
@Nullable private static Boolean nullableBooleanFromJson(JsonObject json, String key)
public static EntityFlagsPredicate fromJson(@Nullable JsonElement json)
private void nullableBooleanToJson(JsonObject json, String key, @Nullable Boolean value)
public JsonElement toJson()