Updated behaviors and entities components

This commit is contained in:
DaanV2
2022-12-07 10:40:43 +01:00
parent 8cc3ef4bc6
commit 8e0228de15
9 changed files with 203 additions and 61 deletions

View File

@@ -8,6 +8,41 @@
"properties": {
"priority": {
"$ref": "./types/priority.json"
},
"chance_to_start": {
"title": "Chance To Start",
"type": "number",
"default": 0.0,
"description": "Percent chance that the mob will start this goal from 0.0 to 1.0 (where 1.0 = 100%)."
},
"filters": {
"title": "Filters",
"$ref": "../../filters/filters.json",
"description": "Conditions that need to be met for the behavior to start."
},
"max_head_rotation_y": {
"title": "Max Head Rotation Y",
"type": "number",
"default": 30,
"description": "Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target."
},
"max_offer_flower_duration": {
"title": "Max Offer Flower Duration",
"type": "number",
"default": 20.0,
"description": "The max amount of time (in seconds) that the mob will offer the flower for before exiting the Goal."
},
"max_rotation_x": {
"title": "Max Rotation X",
"type": "number",
"default": 30,
"description": "Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target."
},
"search_area": {
"title": "Search Area",
"default": [6, 2, 6],
"description": "The dimensions of the AABB used to search for a potential mob to offer flower to.",
"$ref": "../../../../general/vectors/number3.json"
}
}
}

View File

@@ -11,51 +11,20 @@
},
"look_time": {
"title": "Look Time",
"description": "The range of time in seconds the mob will stay looking in a random direction before looking elsewhere.",
"oneOf": [
{
"type": "number"
},
{
"type": "array",
"items": [
{
"type": "number",
"title": "Minimum",
"description": "Minimum."
},
{
"type": "number",
"title": "Maximum",
"description": "Maximum."
}
]
}
]
"$ref": "../../../../general/vectors/number2.json",
"description": "The range of time in seconds the mob will stay looking in a random direction before looking elsewhere"
},
"look_distance": {
"title": "Look Distance",
"description": "The distance in blocks from which the mob will look at.",
"type": "number",
"default": 8.0
},
"probability": {
"title": "Probability",
"type": "number",
"default": 0.02,
"description": "The probability of looking at the target. A value of 1.00 is 100%."
},
"angle_of_view_vertical": {
"title": "Angle Of View Vertical",
"max_angle_of_view_horizontal": {
"title": "Max Angle Of View Horizontal",
"type": "integer",
"default": 360,
"description": "The angle in degrees that the mob can see in the X-axis (left-right)."
"default": 30,
"description": "The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
},
"angle_of_view_horizontal": {
"title": "Angle Of View Horizontal",
"min_angle_of_view_horizontal": {
"title": "Min Angle Of View Horizontal",
"type": "integer",
"default": 360,
"description": "The angle in degrees that the mob can see in the Y-axis (up-down)."
"default": -30,
"description": "The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
}
},
"examples": [

View File

@@ -8,35 +8,59 @@
"priority": {
"$ref": "types/priority.json"
},
"continue_if_leashed": {
"title": "Continue If Leashed",
"type": "boolean",
"default": false,
"description": "If the goal should continue to be used as long as the mob is leashed."
},
"max_angle_of_view_horizontal": {
"title": "Max Angle Of View Horizontal",
"type": "number",
"default": 30.0,
"description": "The rightmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
},
"max_look_count": {
"title": "Max Look Count",
"type": "integer",
"default": 2,
"description": "The Maximum amount of unique looks a mob will have while looking around.",
"title": "Maximum Look Count"
"description": "The max amount of unique looks a mob will have while looking around."
},
"max_look_time": {
"title": "Max Look Time",
"type": "integer",
"default": 40,
"description": "The Maximum amount of time (in ticks) a mob will stay looking at a direction while looking around.",
"title": "Maximum Look Time"
"description": "The max amount of time (in ticks) a mob will stay looking at a direction while looking around."
},
"min_angle_of_view_horizontal": {
"title": "Min Angle Of View Horizontal",
"type": "number",
"default": -30.0,
"description": "The leftmost angle a mob can look at on the horizontal plane with respect to its initial facing direction."
},
"min_look_count": {
"title": "Min Look Count",
"type": "integer",
"default": 1,
"description": "The Minimum amount of unique looks a mob will have while looking around.",
"title": "Minimum Look Count"
"description": "The min amount of unique looks a mob will have while looking around."
},
"min_look_time": {
"title": "Min Look Time",
"type": "integer",
"default": 20,
"description": "The Minimum amount of time (in ticks) a mob will stay looking at a direction while looking around.",
"title": "Minimum Look Time"
"description": "The min amount of time (in ticks) a mob will stay looking at a direction while looking around."
},
"probability": {
"title": "Probability",
"type": "number",
"default": 0.02,
"description": "The probability of randomly looking around/sitting.",
"title": "Probability"
"description": "The probability of randomly looking around/sitting."
},
"random_look_around_cooldown": {
"title": "Random Look Around Cooldown",
"type": "integer",
"default": 0,
"description": "The cooldown in seconds before the goal can be used again."
}
},
"examples": [
@@ -48,4 +72,4 @@
"probability": 0.02
}
]
}
}

View File

@@ -6,8 +6,48 @@
"additionalProperties": false,
"required": [],
"properties": {
"priority": {
"$ref": "./types/priority.json"
"priority": { "$ref": "./types/priority.json" },
"speed_multiplier": { "$ref": "./types/speed_multiplier.json" },
"filters": {
"title": "Filters",
"$ref": "../../filters/filters.json",
"description": "Conditions that need to be met for the behavior to start."
},
"max_head_rotation_y": {
"title": "Max Head Rotation Y",
"type": "number",
"default": 30,
"description": "Maximum rotation (in degrees), on the Y-axis, this entity can rotate its head while trying to look at the target."
},
"max_rotation_x": {
"title": "Max Rotation X",
"type": "number",
"default": 30,
"description": "Maximum rotation (in degrees), on the X-axis, this entity can rotate while trying to look at the target."
},
"max_wait_time": {
"title": "Max Wait Time",
"type": "number",
"default": 20.0,
"description": "The maximum amount of time (in seconds) for the mob to randomly wait for before taking the flower."
},
"min_distance_to_target": {
"title": "Min Distance To Target",
"type": "number",
"default": 2.0,
"description": "Minimum distance (in blocks) for the entity to be considered having reached its target."
},
"min_wait_time": {
"title": "Min Wait Time",
"type": "number",
"default": 4.0,
"description": "The minimum amount of time (in seconds) for the mob to randomly wait for before taking the flower."
},
"search_area": {
"title": "Search Area",
"default": [6, 2, 6],
"description": "The dimensions of the AABB used to search for a potential mob to take a flower from.",
"$ref": "../../../../general/vectors/number3.json"
}
}
}

View File

@@ -42,6 +42,7 @@
"minecraft:custom_hit_test": { "$ref": "./components/custom_hit_test.json" },
"minecraft:damage_over_time": { "$ref": "./components/damage_over_time.json" },
"minecraft:damage_sensor": { "$ref": "./components/damage_sensor.json" },
"minecraft:dash": { "$ref": "./components/dash.json" },
"minecraft:default_look_angle": { "$ref": "./components/default_look_angle.json" },
"minecraft:despawn": { "$ref": "./components/despawn.json" },
"minecraft:drying_out_timer": { "$ref": "./components/drying_out_timer.json" },
@@ -180,6 +181,7 @@
"minecraft:trusting": { "$ref": "./components/trusting.json" },
"minecraft:type_family": { "$ref": "./components/type_family.json" },
"minecraft:underwater_movement": { "$ref": "./components/underwater_movement.json" },
"minecraft:variable_max_auto_step": { "$ref": "./components/variable_max_auto_step.json" },
"minecraft:variant": { "$ref": "./components/variant.json" },
"minecraft:vibration_damper": { "$ref": "./components/vibration_damper.json" },
"minecraft:vibration_listener": { "$ref": "./components/vibration_listener.json" },

View File

@@ -5,6 +5,18 @@
"description": "A component that does damage to entities that get within range.",
"additionalProperties": false,
"properties": {
"cause": {
"title": "Cause",
"$ref": "../../../../general/entity/damage_source.json",
"type": "string",
"description": "The type of damage that is applied to entities that enter the damage range."
},
"damage_cooldown": {
"title": "damage cooldown",
"type": "number",
"default": 0,
"description": "Attack cooldown (in seconds) for how often this entity can attack a target."
},
"damage_per_tick": {
"type": "integer",
"default": 2,
@@ -19,14 +31,14 @@
},
"entity_filter": {
"$ref": "../../filters/filters.json",
"description": "Filter to see which entities can be affected by the attack.",
"description": "The set of entities that are valid to apply the damage to when within range.",
"title": "Entity Filter"
},
"cause": {
"type": "string",
"description": "what causes the attack to occur.",
"title": "Cause",
"$ref": "../../../../general/entity/damage_source.json"
"play_attack_sound": {
"title": "play attack sound",
"type": "boolean",
"default": 4.94066e-324,
"description": "If the entity should play their attack sound when attacking a target."
}
},
"examples": [

View File

@@ -0,0 +1,33 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.dash",
"type": "object",
"title": "Dash",
"additionalProperties": false,
"description": "Ability for a ridable entity to dash.",
"required": [],
"properties": {
"cooldown_time": {
"title": "cooldown time",
"type": "number",
"default": 1.0,
"description": "The dash cooldown in seconds."
},
"horizontal_momentum": {
"title": "horizoontal momentum",
"type": "number",
"default": 1.0,
"description": "Horizontal momentum of the dash."
},
"vertical_momentum": {
"title": "vertical momentum",
"type": "number",
"default": 1.0,
"description": "Vertical momentum of the dash."
}
},
"examples": [
{
"value": 0.0
}
]
}

View File

@@ -0,0 +1,27 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.variable_max_auto_step",
"type": "object",
"title": "Variable Max Auto Step",
"additionalProperties": false,
"description": "Entities with this component will have a maximum auto step height that is different depending on wether they are on a block that prevents jumping. Incompatible with \"runtime_identifier\": \"minecraft:horse\".",
"required": [],
"properties": {
"base_value": {
"title": "base value",
"type": "number",
"default": 0.5625,
"description": "The maximum auto step height when on any other block."
},
"jump_prevented_value": {
"title": "jump prevented value",
"type": "number",
"default": 0.5625,
"description": "The maximum auto step height when on a block that prevents jumping."
}
},
"examples": [
{
"value": 0.0
}
]
}

View File

@@ -3,5 +3,5 @@
"description": "Recipe tags 1.12.0",
"title": "Tags",
"type": "array",
"items": { "type": "string", "title": "Tag", "examples": ["smithing_table"] }
"items": { "type": "string", "title": "Tag", "examples": ["smithing_table", "deprecated"] }
}