Package net.minecraft.predicate.entity
Class EntityPredicate.Extended
java.lang.Object
net.minecraft.predicate.entity.EntityPredicate.Extended
- Enclosing class:
- EntityPredicate
public static class EntityPredicate.Extended extends Object
-
Field Summary
Fields Modifier and Type Field Description private Predicate<LootContext>
combinedCondition
private LootCondition[]
conditions
static EntityPredicate.Extended
EMPTY
-
Constructor Summary
Constructors Modifier Constructor Description private
Extended(LootCondition[] conditions)
-
Method Summary
Modifier and Type Method Description static EntityPredicate.Extended
create(LootCondition[] conditions)
private static EntityPredicate.Extended
fromJson(String key, AdvancementEntityPredicateDeserializer predicateDeserializer, JsonElement json)
static EntityPredicate.Extended
getInJson(JsonObject root, String key, AdvancementEntityPredicateDeserializer predicateDeserializer)
Parses an extended entity check in a sub-value in JSON, accepting objects as simple entity predicates or array as list of loot conditions.static EntityPredicate.Extended
ofLegacy(EntityPredicate predicate)
static EntityPredicate.Extended[]
requireInJson(JsonObject root, String key, AdvancementEntityPredicateDeserializer predicateDeserializer)
Parses an extended entity check in a sub-value in JSON.boolean
test(LootContext context)
JsonElement
toJson(AdvancementEntityPredicateSerializer predicateSerializer)
static JsonElement
toPredicatesJsonArray(EntityPredicate.Extended[] predicates, AdvancementEntityPredicateSerializer predicateSerializer)
-
Field Details
-
EMPTY
-
conditions
-
combinedCondition
-
-
Constructor Details
-
Extended
-
-
Method Details
-
create
-
getInJson
public static EntityPredicate.Extended getInJson(JsonObject root, String key, AdvancementEntityPredicateDeserializer predicateDeserializer)Parses an extended entity check in a sub-value in JSON, accepting objects as simple entity predicates or array as list of loot conditions.- See Also:
- Mojang description
-
requireInJson
public static EntityPredicate.Extended[] requireInJson(JsonObject root, String key, AdvancementEntityPredicateDeserializer predicateDeserializer)Parses an extended entity check in a sub-value in JSON. The value must be absent, JSON null, or an array, or the parser will error. In other words, it does not accept object sub-values. -
fromJson
private static EntityPredicate.Extended fromJson(String key, AdvancementEntityPredicateDeserializer predicateDeserializer, @Nullable JsonElement json) -
ofLegacy
-
test
-
toJson
-
toPredicatesJsonArray
public static JsonElement toPredicatesJsonArray(EntityPredicate.Extended[] predicates, AdvancementEntityPredicateSerializer predicateSerializer)
-