Fill defaults in entity behaviors (#116)

This commit is contained in:
Piotr Brzozowski
2022-10-01 23:06:21 +02:00
committed by GitHub
parent 87f9ed6509
commit d088d35a1e
4 changed files with 23 additions and 12 deletions

View File

@@ -15,23 +15,27 @@
"search_range": {
"type": "integer",
"title": "Search Range",
"description": "Maximum distance to look for a block in xz."
"description": "Maximum distance to look for a block in xz.",
"default": 0
},
"search_height": {
"type": "integer",
"title": "Search Height",
"description": "Maximum distance to look for a block in y."
"description": "Maximum distance to look for a block in y.",
"default": 0
},
"sprint_speed_modifier": {
"type": "number",
"title": "Sprint Speed Modifier",
"description": "Modifier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster."
"description": "Modifier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster.",
"default": 1.0
},
"target_selection_method": {
"type": "string",
"title": "Target Selection Method",
"description": "Block search method.",
"enum": ["random", "nearest"]
"enum": ["random", "nearest"],
"default": "nearest"
},
"target_blocks": {
"type": "array",
@@ -68,7 +72,8 @@
"items": [
{ "type": "number", "title": "Maximum" },
{ "type": "number", "title": "Maximum" }
]
],
"default": [3.0, 8.0]
},
{ "type": "number" },
{

View File

@@ -59,7 +59,7 @@
"title": "On Celebration End Event"
},
"sound_interval": {
"default": 0,
"default": [2, 7],
"description": "Minimum and maximum time between sound events (positive, in seconds).",
"title": "Sound Interval",
"$ref": "../types/range_number_type.json"

View File

@@ -10,12 +10,14 @@
"fireworks_interval": {
"title": "Fireworks Interval",
"$ref": "../types/range_number_type.json",
"description": "Minimum and maximum time between firework (positive, in seconds)."
"description": "Minimum and maximum time between firework (positive, in seconds).",
"default": [10, 20]
},
"duration": {
"title": "Duration",
"description": "The duration in seconds that the celebration lasts for.",
"type": "number"
"type": "number",
"default": 30.0
},
"on_celebration_end_event": {
"title": "On Celebration End Event",

View File

@@ -47,22 +47,26 @@
"radius_change": {
"type": "number",
"title": "Radius Change",
"description": "The number of blocks to increase the current movement radius by, upon successful `radius_adjustment_chance`. If the current radius increases over the range maximum, the current radius will be set back to the range minimum and the entity will change between clockwise and counter-clockwise movement."
"description": "The number of blocks to increase the current movement radius by, upon successful `radius_adjustment_chance`. If the current radius increases over the range maximum, the current radius will be set back to the range minimum and the entity will change between clockwise and counter-clockwise movement.",
"default": 1.0
},
"radius_adjustment_chance": {
"type": "number",
"title": "Radius Adjustment Chance",
"description": "Percent chance to determine how often to increase the size of the current movement radius around the anchor point. 1 = 100%. `radius_change_chance` is deprecated and has been replaced with `radius_adjustment_chance`."
"description": "Percent chance to determine how often to increase the size of the current movement radius around the anchor point. 1 = 100%. `radius_change_chance` is deprecated and has been replaced with `radius_adjustment_chance`.",
"default": 0.004
},
"height_adjustment_chance": {
"type": "number",
"title": "Height Adjustment Chance",
"description": "Percent chance to determine how often to increase or decrease the current height around the anchor point. 1 = 100%. `height_change_chance` is deprecated and has been replaced with `height_adjustment_chance`."
"description": "Percent chance to determine how often to increase or decrease the current height around the anchor point. 1 = 100%. `height_change_chance` is deprecated and has been replaced with `height_adjustment_chance`.",
"default": 0.002857
},
"angle_change": {
"type": "number",
"title": "Angle Change",
"description": "Number of degrees to change this entity's facing by, when the entity selects its next anchor point."
"description": "Number of degrees to change this entity's facing by, when the entity selects its next anchor point.",
"default": 15.0
}
},
"examples": [