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 |
deserialize(JsonElement element) |
private static Boolean |
deserializeBoolean(JsonObject json,
String key) |
private void |
serializeBoolean(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 deserializeBoolean(JsonObject json, String key)
public static EntityFlagsPredicate deserialize(@Nullable JsonElement element)
private void serializeBoolean(JsonObject json, String key, @Nullable Boolean value)
public JsonElement toJson()