Filters¶
文档版本:1.21.50.25
架构¶
filters:
array
{
array "<any array element>" : opt
{
"<any array element>" : opt
}
object "<any array element>" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
actor_health "<any array element>"
all_slots_empty "<any array element>"
any_slots_empty "<any array element>"
bool_property "<any array element>"
clock_time "<any array element>"
distance_to_nearest_player "<any array element>"
enum_property "<any array element>"
float_property "<any array element>"
has_ability "<any array element>"
has_biome_tag "<any array element>"
has_component "<any array element>"
has_container_open "<any array element>"
has_damage "<any array element>"
has_equipment "<any array element>"
has_damaged_equipment "<any array element>"
has_mob_effect "<any array element>"
has_nametag "<any array element>"
has_property "<any array element>"
has_ranged_weapon "<any array element>"
has_silk_touch "<any array element>"
has_tag "<any array element>"
has_target "<any array element>"
has_trade_supply "<any array element>"
hourly_clock_time "<any array element>"
in_block "<any array element>"
in_caravan "<any array element>"
in_clouds "<any array element>"
in_contact_with_water "<any array element>"
in_lava "<any array element>"
in_nether "<any array element>"
in_overworld "<any array element>"
in_water_or_rain "<any array element>"
in_water "<any array element>"
inactivity_timer "<any array element>"
int_property "<any array element>"
is_altitude "<any array element>"
is_avoiding_mobs "<any array element>"
is_biome "<any array element>"
is_block "<any array element>"
is_brightness "<any array element>"
is_climbing "<any array element>"
is_color "<any array element>"
is_daytime "<any array element>"
is_difficulty "<any array element>"
is_family "<any array element>"
is_game_rule "<any array element>"
is_humid "<any array element>"
is_immobile "<any array element>"
is_in_village "<any array element>"
is_leashed_to "<any array element>"
is_leashed "<any array element>"
is_mark_variant "<any array element>"
is_missing_health "<any array element>"
is_moving "<any array element>"
is_moving "<any array element>"
is_owner "<any array element>"
is_persistent "<any array element>"
is_riding "<any array element>"
is_skin_id "<any array element>"
is_sleeping "<any array element>"
is_sneak_held "<any array element>"
is_sneaking "<any array element>"
is_snow_covered "<any array element>"
is_sitting "<any array element>"
is_target "<any array element>"
is_temperature_type "<any array element>"
is_temperature_value "<any array element>"
is_underground "<any array element>"
is_underwater "<any array element>"
is_variant "<any array element>"
is_visible "<any array element>"
is_waterlogged "<any array element>"
light_level "<any array element>"
moon_intensity "<any array element>"
moon_phase "<any array element>"
on_ground "<any array element>"
on_ladder "<any array element>"
random_chance "<any array element>"
rider_count "<any array element>"
surface_mob "<any array element>"
taking_fire_damage "<any array element>"
target_distance "<any array element>"
owner_distance "<any array element>"
trusts "<any array element>"
weather_at_position "<any array element>"
weather "<any array element>"
object "<any array element>" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
}
<any array element>
filters:
{
array "all_of" : opt
{
"<any array element>" : opt
}
object "all_of" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
actor_health "all_of"
all_slots_empty "all_of"
any_slots_empty "all_of"
bool_property "all_of"
clock_time "all_of"
distance_to_nearest_player "all_of"
enum_property "all_of"
float_property "all_of"
has_ability "all_of"
has_biome_tag "all_of"
has_component "all_of"
has_container_open "all_of"
has_damage "all_of"
has_equipment "all_of"
has_damaged_equipment "all_of"
has_mob_effect "all_of"
has_nametag "all_of"
has_property "all_of"
has_ranged_weapon "all_of"
has_silk_touch "all_of"
has_tag "all_of"
has_target "all_of"
has_trade_supply "all_of"
hourly_clock_time "all_of"
in_block "all_of"
in_caravan "all_of"
in_clouds "all_of"
in_contact_with_water "all_of"
in_lava "all_of"
in_nether "all_of"
in_overworld "all_of"
in_water_or_rain "all_of"
in_water "all_of"
inactivity_timer "all_of"
int_property "all_of"
is_altitude "all_of"
is_avoiding_mobs "all_of"
is_biome "all_of"
is_block "all_of"
is_brightness "all_of"
is_climbing "all_of"
is_color "all_of"
is_daytime "all_of"
is_difficulty "all_of"
is_family "all_of"
is_game_rule "all_of"
is_humid "all_of"
is_immobile "all_of"
is_in_village "all_of"
is_leashed_to "all_of"
is_leashed "all_of"
is_mark_variant "all_of"
is_missing_health "all_of"
is_moving "all_of"
is_moving "all_of"
is_owner "all_of"
is_persistent "all_of"
is_riding "all_of"
is_skin_id "all_of"
is_sleeping "all_of"
is_sneak_held "all_of"
is_sneaking "all_of"
is_snow_covered "all_of"
is_sitting "all_of"
is_target "all_of"
is_temperature_type "all_of"
is_temperature_value "all_of"
is_underground "all_of"
is_underwater "all_of"
is_variant "all_of"
is_visible "all_of"
is_waterlogged "all_of"
light_level "all_of"
moon_intensity "all_of"
moon_phase "all_of"
on_ground "all_of"
on_ladder "all_of"
random_chance "all_of"
rider_count "all_of"
surface_mob "all_of"
taking_fire_damage "all_of"
target_distance "all_of"
owner_distance "all_of"
trusts "all_of"
weather_at_position "all_of"
weather "all_of"
object "all_of" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
"any_of" : opt
"none_of" : opt
}
all_of
- All tests in an
all_of
group must pass in order for the group to pass.
any_of
- One or more tests in an
any_of
group must pass in order for the group to pass.
none_of
- All tests in a
none_of
group must fail in order for the group to pass.
test
:string- Tests the health of the subject.
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:integer- (Required) A integer value.
all_slots_empty:
{
string "test" : opt
operator "operator"
subject "subject"
equipment_location "value"
}
test
:string- Returns true when the designated equipment location for the subject entity is completely empty.
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:equipment_location- The equipment location to test.
any_slots_empty:
{
string "test" : opt
operator "operator"
subject "subject"
equipment_location "value"
}
test
:string- Returns true when the designated equipment location for the subject entity has any empty slot.
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:equipment_location- The equipment location to test.
bool_property:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true when the bool actor property matches the value provided.
domain
:string- (Required) The property name to look for
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:boolean- true or false.
test
:string- Compares the current time with a float value in the range (0.0, 1.0). 0.0= Noon 0.25= Sunset 0.5= Midnight 0.75= Sunrise
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:number- (Required) A floating point value.
distance_to_nearest_player:
{
string "test" : opt
operator "operator"
subject "subject"
number "value" : opt
}
test
:string- Compares the distance to the nearest Player with a float value.
operator
:operator
subject
:subject
value
:number- (Required) A floating point value.
enum_property:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
string "value" : opt
}
test
:string- Returns true when the enum actor property matches the value provided.
domain
:string- (Required) The property name to look for
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:string- (Required) A string value.
float_property:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
number "value" : opt
}
test
:string- Returns true when the float actor property matches the value provided.
domain
:string- (Required) The property name to look for
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:number- (Required) A floating point value.
test
:string- Returns true when the subject entity has the named ability.
operator
:operator
subject
:subject
value
:string- (Required) The Ability type to test.
has_biome_tag:
{
string "test" : opt
operator "operator"
subject "subject"
biome_tag "value"
biome "value"
}
test
:string- Tests whether the biome the subject is in has the specified tag.
operator
:operator
subject
:subject
value
:biome_tag- The tag to look for.
value
:biome- The tag to look for.
test
:string- Returns true when the subject entity contains the named component.
operator
:operator
subject
:subject
value
:string- (Required) The component name to look for.
has_container_open:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:boolean- (Optional) true or false.
test
:string- Returns true when the subject entity receives the named damage type.
operator
:operator
subject
:subject
value
:string- The Damage type to test.
has_equipment:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
identifier "value"
}
test
:string- Tests for the presence of a named item in the designated slot of the subject entity.
domain
:string- The equipment location to test.
operator
:operator
subject
:subject
value
:identifier- The item name to look for.
has_damaged_equipment:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
identifier "value"
}
test
:string- Tests for the presence of a damaged named item in the designated slot of the subject entity.
domain
:string- The equipment location to test.
operator
:operator
subject
:subject
value
:identifier- The item name to look for.
test
:string- Tests whether the Subject has the specified mob effect.
operator
:operator
subject
:subject
value
:effect- The specified mob effect.
has_nametag:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Tests for the presence of a named item in the designated slot of the subject entity.
domain
:string- The equipment location to test.
operator
:operator
subject
:subject
value
:boolean- The namtag to look for
test
:string- Tests for the presence of a property of the subject entity.
operator
:operator- (Optionall) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:string- (Required) The property name to look for.
has_ranged_weapon:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true if the subject entity has the tag provided.
operator
:operator
subject
:subject
value
:string- The tag as a string.
has_trade_supply:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Tests whether the target has any trade supply left. Will return false if the target cannot be traded with.
operator
:operator
subject
:subject
value
:boolean- True or false.
hourly_clock_time:
{
string "test" : opt
operator "operator"
subject "subject"
integer "value" : opt
}
test
:string- Compares the current 24 hour time with an int value in the range[0, 24000].
operator
:operator
subject
:subject
value
:integer- (Required) An integer value set between 0 and 24000.
test
:string- Returns true when the subject entity is inside a specified Block type.
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:string- (Optional) A string value.
test
:string- Returns true if the subject entity is in a caravan.
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- Returns true when the subject entity is in the clouds.
operator
:operator
subject
:subject
value
:boolean- True or false.
in_contact_with_water:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true when the subject entity in contact with any water: water, rain, splash water bottle.
operator
:operator
subject
:subject
value
:boolean- (Optional) true or false.
test
:string- Returns true when the subject entity is in lava.
operator
:operator
subject
:subject
value
:boolean- True or false.
in_water_or_rain:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true when the subject entity is in water or rain.
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- Returns true when the subject entity is in water.
operator
:operator
subject
:subject
value
:boolean- True or false.
inactivity_timer:
{
string "test" : opt
operator "operator"
subject "subject"
integer "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:integer- The Family name to look for.
int_property:
{
string "test" : opt
string "domain" : opt
operator "operator"
subject "subject"
integer "value" : opt
}
test
:string- Returns true when the integer actor property matches the value provided.
domain
:string- (Required) The property name to look for
operator
:operator- (Optional) The comparison to apply with
value
.
subject
:subject- (Optional) The subject of this filter test.
value
:integer- (Required) A integer value.
test
:string- Tests the current altitude against a provided value. 0= bedrock elevation.
operator
:operator
subject
:subject
value
:integer- The altitude value to compare with.
is_avoiding_mobs:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true if the subject entity is fleeing from other mobs.
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- Tests whether the Subject is currently in the named biome.
operator
:operator
subject
:subject
value
:biome- The biome type to test.
test
:string- The test property.
operator
:operator
subject
:subject
value
:string- The Family name to look for.
test
:string- Tests the current brightness against a provided value in the range (0.0f, 1.0f).
operator
:operator
subject
:subject
value
:number- The brightness value to compare with.
test
:string- Returns true if the subject entity is climbing.
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- Returns true if the subject entity is the named color.
operator
:operator
subject
:subject
value
:string- The Palette Color to test.
test
:string- Returns true during the daylight hours.
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- Tests the current difficulty level of the game.
operator
:operator
subject
:subject
value
:string- The game's difficulty level to test.
test
:string- Returns true when the subject entity is a member of the named family.
operator
:operator
subject
:subject
value
:string- The Family name to look for.
domain
- The Game Rule to test.
operator
:operator
subject
:subject
value
:boolean- Tests whether a named game rule is active.
test
:string- Tests whether the Subject is in an area with humidity.
operator
:operator
subject
:subject
value
:boolean- True or false.
is_mark_variant:
{
string "test" : opt
operator "operator"
subject "subject"
integer "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:integer- The altitude value to compare with.
is_missing_health:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:integer- The altitude value to compare with.
is_snow_covered:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Returns true if the subject entity is sitting.
operator
:operator
subject
:subject
value
:boolean- True or false.
is_temperature_type:
{
string "test" : opt
operator "operator"
subject "subject"
string "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:string- The Biome temperature catagory to test.
is_temperature_value:
{
string "test" : opt
operator "operator"
subject "subject"
number "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:number- The Biome temperature value to compare with.
test
:string- The test property.
operator
:operator
subject
:subject
value
:integer- The altitude value to compare with.
test
:string- The test property.
operator
:operator
subject
:subject
value
:number- A floating point value.
taking_fire_damage:
{
string "test" : opt
operator "operator"
subject "subject"
boolean "value" : opt
}
test
:string- Tests if the subject is taking fire damage. Requires the damage_sensor component
operator
:operator
subject
:subject
value
:boolean- True or false.
test
:string- The test property.
operator
:operator
subject
:subject
value
:number- (Required) A floating point value.
test
:string- The test property.
operator
:operator
subject
:subject
value
:number- (Required) A floating point value.
weather_at_position:
{
string "test" : opt
operator "operator"
subject "subject"
string "value" : opt
}
test
:string- The test property.
operator
:operator
subject
:subject
value
:string- The Family name to look for.
test
:string- The test property.
operator
:operator
subject
:subject
value
:string- The Family name to look for.
filters:
{
array "all_of" : opt
{
"<any array element>" : opt
}
object "all_of" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
actor_health "all_of"
all_slots_empty "all_of"
any_slots_empty "all_of"
bool_property "all_of"
clock_time "all_of"
distance_to_nearest_player "all_of"
enum_property "all_of"
float_property "all_of"
has_ability "all_of"
has_biome_tag "all_of"
has_component "all_of"
has_container_open "all_of"
has_damage "all_of"
has_equipment "all_of"
has_damaged_equipment "all_of"
has_mob_effect "all_of"
has_nametag "all_of"
has_property "all_of"
has_ranged_weapon "all_of"
has_silk_touch "all_of"
has_tag "all_of"
has_target "all_of"
has_trade_supply "all_of"
hourly_clock_time "all_of"
in_block "all_of"
in_caravan "all_of"
in_clouds "all_of"
in_contact_with_water "all_of"
in_lava "all_of"
in_nether "all_of"
in_overworld "all_of"
in_water_or_rain "all_of"
in_water "all_of"
inactivity_timer "all_of"
int_property "all_of"
is_altitude "all_of"
is_avoiding_mobs "all_of"
is_biome "all_of"
is_block "all_of"
is_brightness "all_of"
is_climbing "all_of"
is_color "all_of"
is_daytime "all_of"
is_difficulty "all_of"
is_family "all_of"
is_game_rule "all_of"
is_humid "all_of"
is_immobile "all_of"
is_in_village "all_of"
is_leashed_to "all_of"
is_leashed "all_of"
is_mark_variant "all_of"
is_missing_health "all_of"
is_moving "all_of"
is_moving "all_of"
is_owner "all_of"
is_persistent "all_of"
is_riding "all_of"
is_skin_id "all_of"
is_sleeping "all_of"
is_sneak_held "all_of"
is_sneaking "all_of"
is_snow_covered "all_of"
is_sitting "all_of"
is_target "all_of"
is_temperature_type "all_of"
is_temperature_value "all_of"
is_underground "all_of"
is_underwater "all_of"
is_variant "all_of"
is_visible "all_of"
is_waterlogged "all_of"
light_level "all_of"
moon_intensity "all_of"
moon_phase "all_of"
on_ground "all_of"
on_ladder "all_of"
random_chance "all_of"
rider_count "all_of"
surface_mob "all_of"
taking_fire_damage "all_of"
target_distance "all_of"
owner_distance "all_of"
trusts "all_of"
weather_at_position "all_of"
weather "all_of"
object "all_of" : opt
{
"all_of" : opt
"any_of" : opt
"none_of" : opt
}
"any_of" : opt
"none_of" : opt
}
all_of
- All tests in an
all_of
group must pass in order for the group to pass.
any_of
- One or more tests in an
any_of
group must pass in order for the group to pass.
none_of
- All tests in a
none_of
group must fail in order for the group to pass.