Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing documentation to behavior components #30

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/behavior/entities/format/behaviors/admire_item.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"on_admire_item_start": {
"$ref": "../types/event.json",
"title": "On Admire Item Start",
"description": "UNDOCUMENTED",
"description": "The event to run when admiring the item",
"$comment": "UNDOCUMENTED"
},
"on_admire_item_stop": {
"$ref": "../types/event.json",
"title": "On Admire Item Stop",
"description": "UNDOCUMENTED",
"description": "The event to run when no longer admiring the item",
"$comment": "UNDOCUMENTED"
},
"sound_interval": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"on_defend_start": {
"$ref": "../types/event.json",
"title": "On Defend Start",
"description": "UNDOCUMENTED",
"description": "The event to run when this mob starts to defend the entity it trusts.",
"$comment": "UNDOCUMENTED"
},
"within_radius": {
Expand All @@ -52,9 +52,11 @@
},
"sound_chance": {
"title": "Sound Chance",
"description": "UNDOCUMENTED",
"description": "The chance that the `aggro_sound` will play",
"$comment": "UNDOCUMENTED",
"type": "number"
"type": "number",
"minimum": 0,
"maximum": 1
DaanV2 marked this conversation as resolved.
Show resolved Hide resolved
}
},
"examples": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"must_reach": {
"title": "Must Reach",
"description": "UNDOCUMENTED",
"description": "If true, the entities considered a threat must be reachable to be a valid target.",
"$comment": "UNDOCUMENTED",
"type": "boolean"
},
Expand Down
6 changes: 3 additions & 3 deletions source/behavior/entities/format/behaviors/eat_block.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
"items": {
"type": "object",
"title": "Eat And Replace Block Pair",
"description": "UNDOCUMENTED",
"description": "The block to eat and the block to replace it with.",
"$comment": "UNDOCUMENTED",
"properties": {
"eat_block": {
"type": "string",
"title": "Block",
"description": "UNDOCUMENTED",
"description": "The block to eat.",
"$comment": "UNDOCUMENTED",
"$ref": "../../../../general/block/identifier.json"
},
"replace_block": {
"type": "string",
"title": "Replace Block",
"description": "UNDOCUMENTED",
"description": "The block to replace the eaten block with.",
"$comment": "UNDOCUMENTED",
"$ref": "../../../../general/block/identifier.json"
}
Expand Down
2 changes: 1 addition & 1 deletion source/behavior/entities/format/behaviors/find_mount.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"max_failed_attempts": {
"type": "integer",
"description": "UNDOCUMENTED",
"description": "The number of failed attempts to make before this goal is no longer used.",
"$comment": "UNDOCUMENTED",
"title": "Maximum Failed Attempts"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"speed_multiplier": { "$ref": "types/speed_multiplier.json" },
"max_seconds_before_search": {
"title": "Maximum Seconds Before Search",
"description": "UNDOCUMENTED",
"description": "The maximum amount of time in seconds that the goal can take before searching for the first harvest block.",
"$comment": "UNDOCUMENTED",
"type": "number"
},
"search_cooldown_max_seconds": {
"title": "Search Cooldown Maximum Seconds",
"description": "UNDOCUMENTED",
"description": "The maximum amount of time in seconds that the goal can take before searching again, after failing to find a a harvest block already.",
DaanV2 marked this conversation as resolved.
Show resolved Hide resolved
"$comment": "UNDOCUMENTED",
"type": "number"
},
"seconds_until_new_task": {
"title": "Seconds Until New Task",
"description": "UNDOCUMENTED",
"description": "The amount of time in seconds that the goal will cooldown after a successful reap/sow, before it can start again.",
"$comment": "UNDOCUMENTED",
"type": "number"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"target_block_filters": {
"title": "Target Block Filters",
"description": "UNDOCUMENTED",
"description": "Filters to apply on the target blocks. Target blocks are only valid if the filters are true.",
"$comment": "UNDOCUMENTED",
"$ref": "../../filters/filters.json"
},
Expand Down
8 changes: 4 additions & 4 deletions source/behavior/entities/format/behaviors/panic.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@
},
"panic_sound": {
"type": "string",
"description": "UNDOCUMENTED",
"description": "The sound event to play when this mob is in panic",
"$comment": "UNDOCUMENTED",
"title": "Panic Sound"
},
"sound_interval": {
"type": "object",
"description": "UNDOCUMENTED",
"description": "Determines how often the `panic_sound` will play",
"$comment": "UNDOCUMENTED",
"title": "Sound Interval",
"properties": {
"range_min": {
"type": "number",
"description": "UNDOCUMENTED",
"description": "The minimum time in seconds before the `panic_sound` plays",
"$comment": "UNDOCUMENTED",
"title": "Range Minimum"
},
"range_max": {
"type": "number",
"description": "UNDOCUMENTED",
"description": "The maximum time in seconds before the `panic_sound` plays",
"$comment": "UNDOCUMENTED",
"title": "Range Maximum"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cooldown_after_being_attacked": {
"type": "number",
"default": true,
"description": "UNDOCUMENTED",
"description": "Duration, in seconds, for which the mob won't pickup items if it was hurt",
"$comment": "UNDOCUMENTED",
"title": "Cooldown After Being Attacked"
},
Expand Down
2 changes: 1 addition & 1 deletion source/behavior/entities/format/behaviors/raid_garden.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"search_height": {
"type": "integer",
"default": 0,
"description": "UNDOCUMENTED",
"description": "Height in blocks the mob will look for crops to eat",
"$comment": "UNDOCUMENTED",
"title": "Search Height"
}
Expand Down
4 changes: 2 additions & 2 deletions source/behavior/entities/format/behaviors/random_fly.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"speed_multiplier": { "$ref": "types/speed_multiplier.json" },
"avoid_damage_blocks": {
"type": "boolean",
"description": "UNDOCUMENTED",
"description": "If true, the mob will avoid blocks that cause damage",
"$comment": "UNDOCUMENTED",
"title": "Avoid Damage Blocks"
},
Expand All @@ -33,7 +33,7 @@
},
"y_offset": {
"type": "integer",
"description": "UNDOCUMENTED",
"description": "Height in blocks to add to the selected target position",
"$comment": "UNDOCUMENTED",
"title": "Y Offset"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"speed_multiplier": { "$ref": "types/speed_multiplier.json" },
"hover_height": {
"type": "array",
"description": "UNDOCUMENTED",
"description": "The range of height in blocks above the surface which the mob will try to hover.",
"$comment": "UNDOCUMENTED",
"title": "Hover Height",
"items": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]
},
"look_distance": {
"description": "UNDOCUMENTED",
"description": "The distance in blocks from which the mob will look at",
"$comment": "UNDOCUMENTED",
"title": "Look Distance",
"type": "number"
Expand Down
26 changes: 14 additions & 12 deletions source/behavior/entities/format/behaviors/send_event.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,39 @@
"event_choices": {
"type": "array",
"title": "Event Choices",
"description": "UNDOCUMENTED",
"description": "List of spells for the mob to use",
"$comment": "UNDOCUMENTED",
"items": {
"type": "object",
"additionalProperties": false,
"title": "Event Choice",
"description": "UNDOCUMENTED",
"description": "A spell that the mob can cast",
"$comment": "UNDOCUMENTED",
"properties": {
"min_activation_range": {
"type": "number",
"title": "Minimum Activation Range",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED"
"description": "The minimum distance in blocks the target must be for this spell to be cast",
"$comment": "UNDOCUMENTED",
"minimum": 0
},
"max_activation_range": {
"type": "number",
"title": "Maxmimum Activation Range",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED"
"description": "The maxmimum distance in blocks the target must be for this spell to be cast",
"$comment": "UNDOCUMENTED",
"minimum": 0
},
"cooldown_time": {
"type": "number",
"title": "Cooldown Time",
"description": "UNDOCUMENTED",
"description": "Time in seconds before the mob can use this spell again",
"$comment": "UNDOCUMENTED"
},
"cast_duration": {
"type": "number",
"title": "Cast Duration",
"description": "UNDOCUMENTED",
"description": "Time in seconds the spell casting will take",
"$comment": "UNDOCUMENTED"
},
"filters": {
Expand All @@ -83,19 +85,19 @@
"type": "string",
"format": "color-hex",
"title": "Particle Color",
"description": "UNDOCUMENTED",
"description": "The color of the particles for this spell",
"$comment": "UNDOCUMENTED"
},
"weight": {
"type": "integer",
"title": "Weight",
"description": "UNDOCUMENTED",
"description": "The weight of this spell. Controls how likely this spell will be picked",
"$comment": "UNDOCUMENTED"
},
"start_sound_event": {
"type": "string",
"title": "Start Sound Event",
"description": "UNDOCUMENTED",
"description": "The sound event to play when using this spell",
"$comment": "UNDOCUMENTED"
},
"sequence": {
Expand All @@ -106,7 +108,7 @@
},
"sequence": {
"$ref": "#/definitions/sequence",
"description": "UNDOCUMENTED",
"description": "List of steps for the spell",
"$comment": "UNDOCUMENTED",
"title": "Sequence"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
},
"leap_dist": {
"type": "number",
"description": "UNDOCUMENTED",
"description": "The distance in blocks the mob jumps in the direction of their target",
"$comment": "UNDOCUMENTED",
"title": "Leap Dist"
},
"stuck_blocks": {
"$ref": "../../filters/filters.json",
"description": "UNDOCUMENTED",
"description": "Filters to apply on the block the mob lands on to determine if it is valid for getting stuck",
"$comment": "UNDOCUMENTED",
"title": "Stuck Block"
}
Expand Down
20 changes: 10 additions & 10 deletions source/behavior/entities/format/behaviors/swim_with_entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$id": "blockception.minecraft.behavior.entities.minecraft.behavior.swim_with_entity",
"type": "object",
"title": "Swim With Entity",
"description": "UNDOCUMENTED",
"description": "Allows this mob to follow another entity, as long as both entities are in water (swimming)",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"required": [],
Expand All @@ -12,55 +12,55 @@
"success_rate": {
"type": "number",
"title": "Success Rate",
"description": "UNDOCUMENTED",
"description": "Chance to start following another entity, if not already doing so",
"$comment": "UNDOCUMENTED"
},
"chance_to_stop": {
"type": "number",
"title": "Chance To Stop",
"description": "UNDOCUMENTED",
"description": "Chance to stop following the current entity",
"$comment": "UNDOCUMENTED"
},
"state_check_interval": {
"type": "number",
"title": "State Check Interval",
"description": "UNDOCUMENTED",
"description": "Time in seconds between checks to determine if this mob should catch up to the entity being followed",
"$comment": "UNDOCUMENTED"
},
"catch_up_threshold": {
"type": "number",
"title": "Catch Up Threshold",
"description": "UNDOCUMENTED",
"description": "Distance in blocks from the entity being followed at which this mob will speed up to catch up",
"$comment": "UNDOCUMENTED"
},
"match_direction_threshold": {
"type": "number",
"title": "Match Direction Threshold",
"description": "UNDOCUMENTED",
"description": "Distance in blocks from the entity being followed at which this mob will match that entity's direction",
"$comment": "UNDOCUMENTED"
},
"catch_up_multiplier": {
"type": "number",
"title": "Catch Up Multiplier",
"description": "UNDOCUMENTED",
"description": "The multiplier applied to the speed of this mob when trying to catch up",
"$comment": "UNDOCUMENTED"
},
"search_range": {
"type": "number",
"title": "Search Range",
"description": "UNDOCUMENTED",
"description": "Radius in blocks around this mob to search for another entity to follow",
"$comment": "UNDOCUMENTED"
},
"stop_distance": {
"type": "number",
"title": "Stop Distance",
"description": "UNDOCUMENTED",
"description": "Distance in blocks from the entity being followed at which this entity will stop following",
"$comment": "UNDOCUMENTED"
},
"entity_types": {
"$ref": "../types/entity_types.json",
"title": "Entity Types",
"description": "UNDOCUMENTED",
"description": "Filters which determine what entites are valid to follow",
"$comment": "UNDOCUMENTED"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"damage_reach": {
"type": "number",
"title": "Damage Reach",
"description": "UNDOCUMENTED",
"description": "Added onto the base size of this mob to determine the maximum distance this mob can deal damage",
"$comment": "UNDOCUMENTED"
},
"delay_range": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.behavior.target_when_pushed",
"description": "UNDOCUMENTED",
"description": "Allows this mob to target an entity that pushed it",
"$comment": "UNDOCUMENTED",
"type": "object",
"title": "Target When Pushed",
Expand All @@ -13,13 +13,13 @@
"entity_types": {
"$ref": "../types/entity_types.json",
"title": "Entity Types",
"description": "UNDOCUMENTED",
"description": "The list of conditions the other entity must meet to be a valid target",
"$comment": "UNDOCUMENTED"
},
"percent_chance": {
"type": "number",
"title": "Percent Chance",
"description": "UNDOCUMENTED",
"description": "The chance that the entity becomes a target when this mob is pushed",
"$comment": "UNDOCUMENTED"
}
},
Expand Down
Loading