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": { "search_range": {
"type": "integer", "type": "integer",
"title": "Search Range", "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": { "search_height": {
"type": "integer", "type": "integer",
"title": "Search Height", "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": { "sprint_speed_modifier": {
"type": "number", "type": "number",
"title": "Sprint Speed Modifier", "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": { "target_selection_method": {
"type": "string", "type": "string",
"title": "Target Selection Method", "title": "Target Selection Method",
"description": "Block search method.", "description": "Block search method.",
"enum": ["random", "nearest"] "enum": ["random", "nearest"],
"default": "nearest"
}, },
"target_blocks": { "target_blocks": {
"type": "array", "type": "array",
@@ -68,7 +72,8 @@
"items": [ "items": [
{ "type": "number", "title": "Maximum" }, { "type": "number", "title": "Maximum" },
{ "type": "number", "title": "Maximum" } { "type": "number", "title": "Maximum" }
] ],
"default": [3.0, 8.0]
}, },
{ "type": "number" }, { "type": "number" },
{ {

View File

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

View File

@@ -10,12 +10,14 @@
"fireworks_interval": { "fireworks_interval": {
"title": "Fireworks Interval", "title": "Fireworks Interval",
"$ref": "../types/range_number_type.json", "$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": { "duration": {
"title": "Duration", "title": "Duration",
"description": "The duration in seconds that the celebration lasts for.", "description": "The duration in seconds that the celebration lasts for.",
"type": "number" "type": "number",
"default": 30.0
}, },
"on_celebration_end_event": { "on_celebration_end_event": {
"title": "On Celebration End Event", "title": "On Celebration End Event",

View File

@@ -47,22 +47,26 @@
"radius_change": { "radius_change": {
"type": "number", "type": "number",
"title": "Radius Change", "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": { "radius_adjustment_chance": {
"type": "number", "type": "number",
"title": "Radius Adjustment Chance", "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": { "height_adjustment_chance": {
"type": "number", "type": "number",
"title": "Height Adjustment Chance", "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": { "angle_change": {
"type": "number", "type": "number",
"title": "Angle Change", "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": [ "examples": [