From 5ffec578127809ceb4f99ffaa53b9e741549802e Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Wed, 20 Apr 2022 12:54:08 +0200 Subject: [PATCH] Now documentated --- .../format/behaviors/avoid_block.json | 3 +- .../format/behaviors/avoid_mob_type.json | 110 +++++++++++------- 2 files changed, 70 insertions(+), 43 deletions(-) diff --git a/source/behavior/entities/format/behaviors/avoid_block.json b/source/behavior/entities/format/behaviors/avoid_block.json index f322fa39..efb62d81 100644 --- a/source/behavior/entities/format/behaviors/avoid_block.json +++ b/source/behavior/entities/format/behaviors/avoid_block.json @@ -2,8 +2,7 @@ "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.avoid_block", "type": "object", "title": "Avoid Block", - "description": "Makes the entity avoid certain blocks while walking, or run away from it", - "$comment": "UNDOCUMENTED", + "description": "Allows this entity to avoid certain blocks.", "additionalProperties": false, "properties": { "priority": { "$ref": "types/priority.json" }, diff --git a/source/behavior/entities/format/behaviors/avoid_mob_type.json b/source/behavior/entities/format/behaviors/avoid_mob_type.json index d61f1239..059ac969 100644 --- a/source/behavior/entities/format/behaviors/avoid_mob_type.json +++ b/source/behavior/entities/format/behaviors/avoid_mob_type.json @@ -1,43 +1,85 @@ { "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.avoid_mob_type", "additionalProperties": false, - "description": "Allows this entity to avoid certain mob types.", "type": "object", "title": "Avoid Mob Type", + "description": "Allows the entity to run away from other entities that meet the criteria specified.", "required": [], "properties": { "priority": { "$ref": "./types/priority.json" }, + "avoid_mob_sound": { + "title": "Avoid Mob Sound", + "type": "string", + "default": "", + "description": "The sound event to play when the mob is avoiding another mob." + }, + "avoid_target_xz": { + "title": "Avoid Target XZ", + "type": "integer", + "default": 16, + "description": "The next target position the entity chooses to avoid another entity will be chosen within this XZ Distance." + }, + "avoid_target_y": { + "title": "Avoid Target Y", + "type": "integer", + "default": 7, + "description": "The next target position the entity chooses to avoid another entity will be chosen within this Y Distance." + }, + "ignore_visibilty": { + "title": "Ignore Visibilty", + "type": "boolean", + "default": false, + "description": "Whether or not to ignore direct line of sight while this entity is running away from other specified entities." + }, "max_dist": { + "title": "Max Dist", "type": "number", - "default": 0, - "description": "Maximum distance to look for an entity", - "title": "Maximum Dist" + "default": 3.0, + "description": "Maximum distance to look for an avoid target for the entity." }, "max_flee": { + "title": "Max Flee", "type": "number", - "default": 0.5, - "description": "Distance in blocks within the mob considers it should stop fleeing.", - "title": "Maximum Flee" - }, - "walk_speed_multiplier": { - "type": "number", - "default": 1.0, - "description": "Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster", - "title": "Walk Speed Multiplier" - }, - "sprint_speed_multiplier": { - "type": "number", - "default": 1.0, - "description": "Multiplier for running speed. 1.0 means keep the regular speed, while higher numbers make the running speed faster", - "title": "Sprint Speed Multiplier" + "default": 10.0, + "description": "How many blocks away from its avoid target the entity must be for it to stop fleeing from the avoid target." }, "probability_per_strength": { + "title": "Probability Per Strength", "type": "number", "default": 1.0, - "description": "Determines how likely it is that this entity will stop avoiding another entity based on that entity's strength", - "title": "Probability Per Strength" + "description": "Percent chance this entity will stop avoiding another entity based on that entity's strength, where 1.0 = 100%." + }, + "remove_target": { + "title": "Remove Target", + "type": "boolean", + "default": false, + "description": "Determine if we should remove target when fleeing or not." + }, + "sprint_distance": { + "title": "Sprint Distance", + "type": "number", + "default": 7.0, + "description": "How many blocks within range of its avoid target the entity must be for it to begin sprinting away from the avoid target." + }, + "sprint_speed_multiplier": { + "title": "Sprint Speed Multiplier", + "type": "number", + "default": 1.0, + "description": "Multiplier for sprint speed. 1.0 means keep the regular speed, while higher numbers make the sprint speed faster." + }, + "walk_speed_multiplier": { + "title": "Walk Speed Multiplier", + "type": "number", + "default": 1.0, + "description": "Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster." + }, + "work_in_rain_tolerance": { + "title": "Work In Rain Tolerance", + "type": "integer", + "default": -1, + "description": "If \"can_work_in_rain\" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal" }, "ignore_visibility": { "type": "boolean", @@ -47,32 +89,18 @@ }, "entity_types": { "$ref": "../types/entity_types.json", - "description": "UNDOCUMENTED: entity types", - "title": "Entity Types" - }, - "avoid_mob_sound": { - "title": "Avoid Mob Sound", - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED", - "type": "string" - }, - "remove_target": { - "title": "Remove Target", - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED", - "type": "boolean" + "title": "Entity Types", + "description": "The list of conditions another entity must meet to be a valid target to avoid." }, "on_escape_event": { "$ref": "../types/event.json", "title": "On Escape Event", - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED" + "description": "Event that is triggered when escaping from a mob." }, "sound_interval": { - "default": 0, - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED", "title": "Sound Interval", + "default": [3.0, 8.0], + "description": "The range of time in seconds to randomly wait before playing the sound again.", "oneOf": [ { "type": "array", @@ -117,4 +145,4 @@ "remove_target": true } ] -} \ No newline at end of file +}