Addeding property filters
This commit is contained in:
@@ -80,8 +80,11 @@
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{ "if": { "properties": { "test": { "const": "bool_property" } } }, "then": { "$ref": "./filters/bool_property.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "clock_time" } } }, "then": { "$ref": "./filters/clock_time.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "distance_to_nearest_player" } } }, "then": { "$ref": "./filters/distance_to_nearest_player.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "enum_property" } } }, "then": { "$ref": "./filters/enum_property.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "float_property" } } }, "then": { "$ref": "./filters/float_property.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_ability" } } }, "then": { "$ref": "./filters/has_ability.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_biome_tag" } } }, "then": { "$ref": "./filters/has_biome_tag.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_component" } } }, "then": { "$ref": "./filters/has_component.json" } },
|
||||
@@ -90,6 +93,7 @@
|
||||
{ "if": { "properties": { "test": { "const": "has_equipment" } } }, "then": { "$ref": "./filters/has_equipment.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_mob_effect" } } }, "then": { "$ref": "./filters/has_mob_effect.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_nametag" } } }, "then": { "$ref": "./filters/has_nametag.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_property" } } }, "then": { "$ref": "./filters/has_property.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_ranged_weapon" } } }, "then": { "$ref": "./filters/has_ranged_weapon.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_silk_touch" } } }, "then": { "$ref": "./filters/has_silk_touch.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "has_tag" } } }, "then": { "$ref": "./filters/has_tag.json" } },
|
||||
@@ -105,6 +109,7 @@
|
||||
{ "if": { "properties": { "test": { "const": "in_water_or_rain" } } }, "then": { "$ref": "./filters/in_water_or_rain.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "in_water" } } }, "then": { "$ref": "./filters/in_water.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "inactivity_timer" } } }, "then": { "$ref": "./filters/inactivity_timer.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "int_property" } } }, "then": { "$ref": "./filters/int_property.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "is_altitude" } } }, "then": { "$ref": "./filters/is_altitude.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "is_avoiding_mobs" } } }, "then": { "$ref": "./filters/is_avoiding_mobs.json" } },
|
||||
{ "if": { "properties": { "test": { "const": "is_biome" } } }, "then": { "$ref": "./filters/is_biome.json" } },
|
||||
|
||||
38
source/behavior/entities/filters/filters/bool_property.json
Normal file
38
source/behavior/entities/filters/filters/bool_property.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.entities.filters.bool_property",
|
||||
"type": "object",
|
||||
"title": "Bool Property",
|
||||
"description": "Returns true when the bool actor property matches the value provided.",
|
||||
"required": ["value", "domain"],
|
||||
"examples": [{ "test": "bool_property", "value": true }],
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string",
|
||||
"title": "Test Property",
|
||||
"description": "Returns true when the bool actor property matches the value provided."
|
||||
},
|
||||
"domain": {
|
||||
"description": "(Required) The property name to look for",
|
||||
"title": "Operator",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"$ref": "./types/operator.json",
|
||||
"description": "(Optional) The comparison to apply with `value`.",
|
||||
"default": "equals",
|
||||
"title": "Operator"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "./types/subject.json",
|
||||
"description": "(Optional) The subject of this filter test.",
|
||||
"default": "self",
|
||||
"title": "Subject"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"title": "Value",
|
||||
"description": "true or false."
|
||||
}
|
||||
}
|
||||
}
|
||||
37
source/behavior/entities/filters/filters/enum_property.json
Normal file
37
source/behavior/entities/filters/filters/enum_property.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.entities.filters.enum_property",
|
||||
"type": "object",
|
||||
"title": "Enum Property",
|
||||
"description": "Returns true when the enum actor property matches the value provided.",
|
||||
"required": ["value", "domain"],
|
||||
"examples": [{ "test": "bool_property", "value": true }],
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string",
|
||||
"title": "Test Property",
|
||||
"description": "Returns true when the enum actor property matches the value provided."
|
||||
},
|
||||
"domain": {
|
||||
"description": "(Required) The property name to look for",
|
||||
"title": "Operator",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"$ref": "./types/operator.json",
|
||||
"description": "(Optional) The comparison to apply with `value`.",
|
||||
"default": "equals",
|
||||
"title": "Operator"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "./types/subject.json",
|
||||
"description": "(Optional) The subject of this filter test.",
|
||||
"default": "self",
|
||||
"title": "Subject"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"title": "Value",
|
||||
"description": "(Required) A string value."
|
||||
}
|
||||
}
|
||||
}
|
||||
37
source/behavior/entities/filters/filters/float_property.json
Normal file
37
source/behavior/entities/filters/filters/float_property.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.entities.filters.float_property",
|
||||
"type": "object",
|
||||
"title": "Float Property",
|
||||
"description": "Returns true when the float actor property matches the value provided.",
|
||||
"required": ["value", "domain"],
|
||||
"examples": [{ "test": "bool_property", "value": true }],
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string",
|
||||
"title": "Test Property",
|
||||
"description": "Returns true when the float actor property matches the value provided."
|
||||
},
|
||||
"domain": {
|
||||
"description": "(Required) The property name to look for",
|
||||
"title": "Operator",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"$ref": "./types/operator.json",
|
||||
"description": "(Optional) The comparison to apply with `value`.",
|
||||
"default": "equals",
|
||||
"title": "Operator"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "./types/subject.json",
|
||||
"description": "(Optional) The subject of this filter test.",
|
||||
"default": "self",
|
||||
"title": "Subject"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"title": "Value",
|
||||
"description": "(Required) A floating point value."
|
||||
}
|
||||
}
|
||||
}
|
||||
32
source/behavior/entities/filters/filters/has_property.json
Normal file
32
source/behavior/entities/filters/filters/has_property.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.entities.filters.has_property",
|
||||
"type": "object",
|
||||
"title": "Has Property",
|
||||
"description": "Tests for the presence of a property of the subject entity.",
|
||||
"required": ["value", "domain"],
|
||||
"examples": [{ "test": "bool_property", "value": true }],
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string",
|
||||
"title": "Test Property",
|
||||
"description": "Tests for the presence of a property of the subject entity."
|
||||
},
|
||||
"operator": {
|
||||
"$ref": "./types/operator.json",
|
||||
"description": "(Optionall) The comparison to apply with `value`.",
|
||||
"default": "equals",
|
||||
"title": "Operator"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "./types/subject.json",
|
||||
"description": "(Optional) The subject of this filter test.",
|
||||
"default": "self",
|
||||
"title": "Subject"
|
||||
},
|
||||
"value": {
|
||||
"title": "Value",
|
||||
"type": "string",
|
||||
"description": "(Required) The property name to look for."
|
||||
}
|
||||
}
|
||||
}
|
||||
37
source/behavior/entities/filters/filters/int_property.json
Normal file
37
source/behavior/entities/filters/filters/int_property.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.entities.filters.int_property",
|
||||
"type": "object",
|
||||
"title": "Int Property",
|
||||
"description": "Returns true when the int actor property matches the value provided.",
|
||||
"required": ["value", "domain"],
|
||||
"examples": [{ "test": "bool_property", "value": true }],
|
||||
"properties": {
|
||||
"test": {
|
||||
"type": "string",
|
||||
"title": "Test Property",
|
||||
"description": "Returns true when the int actor property matches the value provided."
|
||||
},
|
||||
"domain": {
|
||||
"description": "(Required) The property name to look for",
|
||||
"title": "Operator",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"$ref": "./types/operator.json",
|
||||
"description": "(Optional) The comparison to apply with `value`.",
|
||||
"default": "equals",
|
||||
"title": "Operator"
|
||||
},
|
||||
"subject": {
|
||||
"$ref": "./types/subject.json",
|
||||
"description": "(Optional) The subject of this filter test.",
|
||||
"default": "self",
|
||||
"title": "Subject"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"title": "Value",
|
||||
"description": "(Required) A floating point value."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,54 @@
|
||||
},
|
||||
"speed_multiplier": {
|
||||
"$ref": "types/speed_multiplier.json"
|
||||
},
|
||||
"chance_to_start": {
|
||||
"title": "Chance To Start",
|
||||
"type": "number",
|
||||
"default": 0.0,
|
||||
"description": "Percent chance that the mob will start this goal, from 0 to 1."
|
||||
},
|
||||
"follow_distance": {
|
||||
"title": "Follow Distance",
|
||||
"type": "integer",
|
||||
"default": 2,
|
||||
"description": "The distance (in blocks) that the mob tries to be in range of the friend it's following."
|
||||
},
|
||||
"friend_search_area": {
|
||||
"title": "Friend Search Area",
|
||||
"default": [6, 3, 6],
|
||||
"$ref": "../../../../general/vectors/number3.json",
|
||||
"description": "The dimensions of the AABB used to search for a potential friend to play with."
|
||||
},
|
||||
"friend_types": {
|
||||
"title": "Friend Types",
|
||||
"type": "array",
|
||||
"description": "The entity type(s) to consider when searching for a potential friend to play with.",
|
||||
"items": {
|
||||
"filters": {
|
||||
"title": "Filters",
|
||||
"description": "UNDOCUMENTATED",
|
||||
"$ref": "../../filters/filters.jon"
|
||||
}
|
||||
}
|
||||
},
|
||||
"max_play_duration_seconds": {
|
||||
"title": "Max Play Duration Seconds",
|
||||
"type": "number",
|
||||
"default": 50.0,
|
||||
"description": "The max amount of seconds that the mob will play for before exiting the Goal."
|
||||
},
|
||||
"random_pos_search_height": {
|
||||
"title": "Random Pos Search Height",
|
||||
"type": "integer",
|
||||
"default": 3,
|
||||
"description": "The height (in blocks) that the mob will search within to find a random position position to move to. Must be at least 1."
|
||||
},
|
||||
"random_pos_search_range": {
|
||||
"title": "Random Pos Search Range",
|
||||
"type": "integer",
|
||||
"default": 16,
|
||||
"description": "The distance (in blocks) on ground that the mob will search within to find a random position to move to. Must be at least 1."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user