Special Predicates - DragonSurvivalTeam/DragonSurvival GitHub Wiki
Description
There are a few new custom predicates that have been added by Dragon Survival.
Predicates
DragonPredicate
The dragon predicate contains various pieces of information about a dragon.
DragonStagePredicate
Various pieces of info about the current dragon stage.
Schema
{
"dragon_stage": [DragonStage] // [Optional] || What dragon stage to match against.
"growth_percentage": [Bounds] // [Optional] || Min/max growth percentage to match against.
"size": [Bounds] // [Optional] || Min/max size to match against.
}
Schema
{
"dragon_species": [DragonSpecies] // [Optional] || What dragon species to match against.
"stage_specific": [DragonStagePredicate] // [Optional] || What data about dragon stages to match against.
"dragon_body": [DragonBody] // [Optional] || What dragon body types to match against.
"star_heart_state": [StarHeartState] // [Optional] || Whether the star heart item is active or not. Takes only `"inactive"` or `"active"`.
}
EntityCheckPredicate
Matches against a type of entity. The valid types are:
"living_entity"
"enemy"
"tamed"
"item"
"experience_orb"
Schema
{
"check_for": [EntityCheckPredicateType] // [Optional] || The type of entity to check for.
}
CustomPredicates
A few general checks that are not in the normal entity predicate.
WeatherPredicate
Whether it is raining or thundering.
Schema
{
"is_raining": [bool] // [Optional] || Whether it is raining.
"is_thundering": [bool] // [Optional] || Whether it is thundering.
}
NearbyEntityPredicate
Checks whether a certain Entity Type is nearby.
Schema
{
"types": [EntityType] // [Mandatory] || The list of entities to check.
"radius": [number] // [Mandatory] || The radius to check entities within.
}
Schema
{
"eye_in_fluid": [FluidType] // [Optional] || Whether the entities eye is in a fluid.
"weather_predicate": [WeatherPredicate] // [Optional] || Whether it is raining or thundering over the entity.
"sun_light_level": [Bounds] // [Optional] || Matches a range of light levels against the sun's brightness at the entity's position.
"has_ability_effect": [ResourceLocation] // [Optional] || Whether the target entity has a certain ability effect. This could be anything that has a [DurationInstanceBase](https://github.com/DragonSurvivalTeam/DragonSurvival/wiki/DurationInstanceBase)
"is_nearby_entity": [NearbyEntityPredicate] // [Optional] || Whether a certain entity is nearby.
}