Skip to content

Commit

Permalink
Solving some missing schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Mar 23, 2024
1 parent cc2869f commit 432bde8
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@
"on_item_throw": {
"title": "On Item Throw",
"description": "Event(s) to run when this mob throws items.",
"oneOf": [
{ "$ref": "../types/trigger.json" },
{
"type": "array",
"items": { "$ref": "../types/trigger.json" }
}
]
"$ref": "../types/trigger.json"
},
"reach_block_distance": {
"title": "Reach Block Distance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
"on_item_throw": {
"title": "On Item Throw",
"description": "Event(s) to run when this mob throws items.",
"oneOf": [
{ "$ref": "../types/trigger.json" },
{
"type": "array",
"items": { "$ref": "../types/trigger.json" }
}
]
"$ref": "../types/trigger.json"
},
"reach_mob_distance": {
"title": "Reach Mob Distance",
Expand Down
11 changes: 4 additions & 7 deletions source/behavior/entities/format/behaviors/go_home.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
"on_home": {
"description": "Event(s) to run when this mob gets home.",
"title": "On Home",
"type": "array",
"items": {
"$ref": "../types/trigger.json"
}
"$ref": "../types/trigger.json"
},
"on_failed": {
"title": "On Failed",
"description": "Event(s) to run when this goal fails.",
"type": "array",
"items": {
"$ref": "../types/event.json"
"type": "array",
"items": {
"$ref": "../types/event.json"
}
},
"calculate_new_path_radius": {
Expand Down
4 changes: 2 additions & 2 deletions source/behavior/entities/format/behaviors/move_to_block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"on_stay_completed": {
"title": "On Stay Completed",
"description": "Event to run on completing a stay of stay_duration at the block.",
"oneOf": [{ "type": "array", "items": { "$ref": "../types/trigger.json" } }, { "$ref": "../types/trigger.json" }]
"$ref": "../types/trigger.json"
},
"on_reach": {
"title": "On Reach",
"description": "Event to run on block reached.",
"oneOf": [{ "type": "array", "items": { "$ref": "../types/trigger.json" } }, { "$ref": "../types/trigger.json" }]
"$ref": "../types/trigger.json"
},
"start_chance": {
"title": "Start Chance",
Expand Down
42 changes: 31 additions & 11 deletions source/behavior/entities/format/behaviors/random_look_around.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,47 @@
"priority": {
"$ref": "./types/priority.json"
},
"angle_of_view_horizontal": {
"title": "Angle Of View Horizontal",
"type": "integer",
"default": 360,
"description": "The angle in degrees that an entity can see in the Y-axis (up-down)."
},
"angle_of_view_vertical": {
"title": "Angle Of View Vertical",
"type": "integer",
"default": 360,
"description": "The angle in degrees that an entity can see in the X-axis (left-right)."
},
"look_distance": {
"title": "Look Distance",
"type": "number",
"default": 8.0,
"description": "The distance in blocks from which the entity will look at."
},
"look_time": {
"title": "Look Time",
"$ref": "../../../../general/vectors/number2.json",
"description": "The range of time in seconds the mob will stay looking in a random direction before looking elsewhere"
},
"max_angle_of_view_horizontal": {
"title": "Max Angle Of View Horizontal",
"type": "integer",
"default": 30,
"description": "The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
},
"min_angle_of_view_horizontal": {
"title": "Min Angle Of View Horizontal",
"type": "integer",
"default": -30,
"description": "The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
"probability": {
"title": "Probability",
"type": "number",
"default": 0.2,
"description": "The probability of looking at the target. A value of 1.00 is 100%."
}
},
"examples": [
{
"look_distance": 0.0
},
{
"priority": 2,
"max_look_count": 4,
"min_look_count": 1,
"max_look_time": 60,
"min_look_time": 5,
"probability": 0.35
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,11 @@
]
}
],
"definitions": {
"trigger": {
"$ref": "../types/trigger.json"
}
},
"properties": {
"triggers": {
"description": "The list of triggers that fire when the environment conditions match the given filter criteria.",
"title": "Triggers",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/trigger"
}
},
{
"type": "object",
"$ref": "#/definitions/trigger"
}
]
"$ref": "../types/trigger.json"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
"type": "string",
"default": "",
"description": "Entity Definition that this entity will transform into.",
"title": "Into"
"title": "Into",
"examples": ["minecraft:drowned<minecraft:as_baby>", "minecraft:drowned"]
},
"keep_level": {
"type": "boolean",
Expand Down
5 changes: 5 additions & 0 deletions source/behavior/entities/format/types/entity_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"description": "UNDOCUMENTED.",
"title": "Priority"
},
"within_default": {
"type": "number",
"description": "UNDOCUMENTED.",
"title": "Within Default"
},
"check_if_outnumbered": {
"type": "boolean",
"description": "UNDOCUMENTED.",
Expand Down

0 comments on commit 432bde8

Please sign in to comment.