From e294058f60e1bffd3938eb361da2c3d2376056bc Mon Sep 17 00:00:00 2001 From: Xterionix <72647213+Xterionix@users.noreply.github.com> Date: Thu, 27 Jun 2024 23:53:43 +0500 Subject: [PATCH] - Misc fixes for entity components --- .../entities/format/behaviors/celebrate.json | 1 - .../entities/format/behaviors/drop_item_for.json | 3 +-- .../entities/format/behaviors/eat_mob.json | 2 -- .../entities/format/behaviors/lay_egg.json | 10 +++++----- .../format/behaviors/random_search_and_dig.json | 3 +-- .../entities/format/behaviors/sonic_boom.json | 2 +- .../entities/format/behaviors/trade_interest.json | 2 +- .../format/components/ambient_sound_interval.json | 2 +- .../entities/format/components/area_attack.json | 4 ++-- .../entities/format/components/attack.json | 2 +- .../entities/format/components/break_blocks.json | 2 +- .../format/components/economy_trade_table.json | 1 - .../entities/format/components/healable.json | 10 ++++------ .../entities/format/components/interact.json | 3 --- .../format/components/item_controllable.json | 2 +- .../entities/format/components/nameable.json | 1 - .../entities/format/components/projectile.json | 15 ++++++--------- .../entities/format/components/shooter.json | 2 -- .../entities/format/components/spawn_entity.json | 1 - 19 files changed, 25 insertions(+), 43 deletions(-) diff --git a/source/behavior/entities/format/behaviors/celebrate.json b/source/behavior/entities/format/behaviors/celebrate.json index 29250a09..5db0cfa6 100644 --- a/source/behavior/entities/format/behaviors/celebrate.json +++ b/source/behavior/entities/format/behaviors/celebrate.json @@ -7,7 +7,6 @@ "properties": { "priority": { "$ref": "types/priority.json" }, "celebration_sound": { - "default": "", "description": "The sound event to trigger during the celebration.", "title": "Celebration Sound", "$ref": "../../../../general/sound_event.json" diff --git a/source/behavior/entities/format/behaviors/drop_item_for.json b/source/behavior/entities/format/behaviors/drop_item_for.json index c01b2e82..c7ce30ff 100644 --- a/source/behavior/entities/format/behaviors/drop_item_for.json +++ b/source/behavior/entities/format/behaviors/drop_item_for.json @@ -33,8 +33,7 @@ "loot_table": { "title": "Loot Table", "type": "string", - "description": "The loot table that contains the possible loot the entity can drop with this goal.", - "examples": ["loot_tables/"] + "description": "The loot table that contains the possible loot the entity can drop with this goal." }, "max_head_look_at_height": { "title": "Max Head Look At Height", diff --git a/source/behavior/entities/format/behaviors/eat_mob.json b/source/behavior/entities/format/behaviors/eat_mob.json index bef9b0d0..bc2ddc22 100644 --- a/source/behavior/entities/format/behaviors/eat_mob.json +++ b/source/behavior/entities/format/behaviors/eat_mob.json @@ -16,13 +16,11 @@ "eat_mob_sound": { "title": "Eat Mob Sound", "$ref": "../../../../general/sound_event.json", - "default": "", "description": "Sets the sound that should play when eating a mob." }, "loot_table": { "title": "Loot Table", "type": "string", - "default": "", "description": "The loot table for loot to be dropped when eating a mob." }, "pull_in_force": { diff --git a/source/behavior/entities/format/behaviors/lay_egg.json b/source/behavior/entities/format/behaviors/lay_egg.json index 0fd76e43..d8c1bc82 100644 --- a/source/behavior/entities/format/behaviors/lay_egg.json +++ b/source/behavior/entities/format/behaviors/lay_egg.json @@ -31,13 +31,13 @@ "title": "Lay Egg Sound", "$ref": "../../../../general/sound_event.json", "default": "lay_egg", - "description": "[EXPERIMENTAL] Sound event name for laying egg. Defaulted to lay_egg which is used for Turtles." + "description": "Sound event name for laying egg. Defaulted to lay_egg which is used for Turtles." }, "lay_seconds": { "title": "Lay Seconds", "type": "number", "default": 10.0, - "description": "[EXPERIMENTAL] Duration of the laying egg process in seconds." + "description": "Duration of the laying egg process in seconds." }, "on_lay": { "title": "On Lay", @@ -61,20 +61,20 @@ "type": "array", "default": ["minecraft:sand"], "items": { "title": "Block ID", "$ref": "../../../../general/item/descriptor.json" }, - "description": "[EXPERIMENTAL] Blocks that the mob can lay its eggs on top of." + "description": "Blocks that the mob can lay its eggs on top of." }, "target_materials_above_block": { "title": "Target Materials Above Block", "type": "array", "default": ["Air"], "enum": ["Air", "Any", "Lava", "Water"], - "description": "[EXPERIMENTAL] Types of materials that can exist above the target block. Valid types are Air, Water, and Lava." + "description": "Types of materials that can exist above the target block. Valid types are Air, Water, and Lava." }, "use_default_animation": { "title": "Use Default Animation", "type": "boolean", "default": true, - "description": "[EXPERIMENTAL] Specifies if the default lay-egg animation should be played when the egg is placed or not." + "description": "Specifies if the default lay-egg animation should be played when the egg is placed or not." } }, "examples": [ diff --git a/source/behavior/entities/format/behaviors/random_search_and_dig.json b/source/behavior/entities/format/behaviors/random_search_and_dig.json index c2f5018e..31b240fe 100644 --- a/source/behavior/entities/format/behaviors/random_search_and_dig.json +++ b/source/behavior/entities/format/behaviors/random_search_and_dig.json @@ -45,8 +45,7 @@ "item_table": { "title": "Item Table", "type": "string", - "default": "", - "description": "File path relative to the resource pack root for items to spawn list (loot table format)." + "description": "File path relative to the behavior pack root for items to spawn list (loot table format)." }, "on_digging_start": { "title": "On Digging Start", diff --git a/source/behavior/entities/format/behaviors/sonic_boom.json b/source/behavior/entities/format/behaviors/sonic_boom.json index 89f43802..67df3c26 100644 --- a/source/behavior/entities/format/behaviors/sonic_boom.json +++ b/source/behavior/entities/format/behaviors/sonic_boom.json @@ -3,7 +3,7 @@ "additionalProperties": false, "type": "object", "title": "Sonic Boom", - "description": "[EXPERIMENTAL BEHAVIOR] Plays the provided sounds and activates the `SONIC BOOM` actor flag during the specified duration", + "description": "Plays the provided sounds and activates the `SONIC BOOM` actor flag during the specified duration", "properties": { "priority": { "$ref": "./types/priority.json" }, "speed_multiplier": { "$ref": "types/speed_multiplier.json" }, diff --git a/source/behavior/entities/format/behaviors/trade_interest.json b/source/behavior/entities/format/behaviors/trade_interest.json index 64b02a2b..97058672 100644 --- a/source/behavior/entities/format/behaviors/trade_interest.json +++ b/source/behavior/entities/format/behaviors/trade_interest.json @@ -25,7 +25,7 @@ "type": "number", "default": 45, "description": "The Maximum time in seconds that the trader will be interested with showing it's trade items.", - "title": "Interest_time" + "title": "Interest Time" }, "remove_item_time": { "type": "number", diff --git a/source/behavior/entities/format/components/ambient_sound_interval.json b/source/behavior/entities/format/components/ambient_sound_interval.json index 07fb0e40..ed30d3a7 100644 --- a/source/behavior/entities/format/components/ambient_sound_interval.json +++ b/source/behavior/entities/format/components/ambient_sound_interval.json @@ -23,7 +23,7 @@ "title": "Condition" }, "event_name": { - "$ref": "../../../../general/sound_event.json", + "type": "string", "description": "Level sound event to be played as the ambient sound.", "title": "Event Name" } diff --git a/source/behavior/entities/format/components/area_attack.json b/source/behavior/entities/format/components/area_attack.json index dc68823e..957b5b7d 100644 --- a/source/behavior/entities/format/components/area_attack.json +++ b/source/behavior/entities/format/components/area_attack.json @@ -12,7 +12,7 @@ "description": "The type of damage that is applied to entities that enter the damage range." }, "damage_cooldown": { - "title": "damage cooldown", + "title": "Damage Cooldown", "type": "number", "default": 0, "description": "Attack cooldown (in seconds) for how often this entity can attack a target." @@ -35,7 +35,7 @@ "title": "Entity Filter" }, "play_attack_sound": { - "title": "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." diff --git a/source/behavior/entities/format/components/attack.json b/source/behavior/entities/format/components/attack.json index 3f0fcae6..67697ee0 100644 --- a/source/behavior/entities/format/components/attack.json +++ b/source/behavior/entities/format/components/attack.json @@ -13,8 +13,8 @@ }, "effect_name": { "type": "string", + "$ref": "../../../../general/vanilla/effect.json", "description": "Identifier of the status ailment to apply to an entity attacked by this entity's melee attack.", - "examples": ["wither", "hunger"], "title": "Effect Name" }, "effect_duration": { diff --git a/source/behavior/entities/format/components/break_blocks.json b/source/behavior/entities/format/components/break_blocks.json index 30ce5d25..fa7edbee 100644 --- a/source/behavior/entities/format/components/break_blocks.json +++ b/source/behavior/entities/format/components/break_blocks.json @@ -1,5 +1,5 @@ { - "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.break_blocks", + "$id": "blockception.minecraft.behavior.entities.minecraft.break_blocks", "type": "object", "title": "Break Blocks", "additionalProperties": false, diff --git a/source/behavior/entities/format/components/economy_trade_table.json b/source/behavior/entities/format/components/economy_trade_table.json index d6563310..e556787f 100644 --- a/source/behavior/entities/format/components/economy_trade_table.json +++ b/source/behavior/entities/format/components/economy_trade_table.json @@ -92,7 +92,6 @@ }, "table": { "type": "string", - "default": "", "description": "File path relative to the resource pack root for this entity's trades.", "title": "Table" }, diff --git a/source/behavior/entities/format/components/healable.json b/source/behavior/entities/format/components/healable.json index 55d0671b..ac2b6a70 100644 --- a/source/behavior/entities/format/components/healable.json +++ b/source/behavior/entities/format/components/healable.json @@ -11,23 +11,21 @@ "properties": { "name": { "title": "Name", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", + "description": "Effect name.", + "$ref": "../../../../general/vanilla/effect.json", "type": "string" }, "duration": { "type": "integer", "default": 0, "minimum": 0, - "description": "The duration of the effect.", - "$comment": "UNDOCUMENTED" + "description": "The duration of the effect." }, "amplifier": { "type": "integer", "default": 0, "minimum": 0, - "description": "The amplifier of the effect.", - "$comment": "UNDOCUMENTED" + "description": "The amplifier of the effect." } } } diff --git a/source/behavior/entities/format/components/interact.json b/source/behavior/entities/format/components/interact.json index 04e618cb..1d52461c 100644 --- a/source/behavior/entities/format/components/interact.json +++ b/source/behavior/entities/format/components/interact.json @@ -65,7 +65,6 @@ "interact_text": { "title": "Interact Text", "type": "string", - "default": "", "description": "Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls." }, "on_interact": { @@ -98,13 +97,11 @@ "play_sounds": { "title": "Play Sounds", "$ref": "../../../../general/sound_event.json", - "default": "", "description": "List of sounds to play when the interaction occurs." }, "spawn_entities": { "title": "Spawn Entities", "type": "string", - "default": "", "description": "List of entities to spawn when the interaction occurs." }, "spawn_items": { diff --git a/source/behavior/entities/format/components/item_controllable.json b/source/behavior/entities/format/components/item_controllable.json index bcc7ad45..1eb05502 100644 --- a/source/behavior/entities/format/components/item_controllable.json +++ b/source/behavior/entities/format/components/item_controllable.json @@ -1,6 +1,6 @@ { "$id": "blockception.minecraft.behavior.entities.minecraft.item_controllable", - "description": "Efines what items can be used to control this entity while ridden.", + "description": "Defines what items can be used to control this entity while ridden.", "type": "object", "title": "Item Controllable", "additionalProperties": false, diff --git a/source/behavior/entities/format/components/nameable.json b/source/behavior/entities/format/components/nameable.json index 762818ff..28ac24b2 100644 --- a/source/behavior/entities/format/components/nameable.json +++ b/source/behavior/entities/format/components/nameable.json @@ -13,7 +13,6 @@ "properties": { "name_filter": { "type": "string", - "default": "", "description": "List of special names that will cause the events defined in `on_named` to fire.", "title": "Name Filter" }, diff --git a/source/behavior/entities/format/components/projectile.json b/source/behavior/entities/format/components/projectile.json index 441d3a92..c91765b5 100644 --- a/source/behavior/entities/format/components/projectile.json +++ b/source/behavior/entities/format/components/projectile.json @@ -37,7 +37,6 @@ }, "filter": { "type": "string", - "default": "", "description": "Entity Definitions defined here can't be hurt by the projectile.", "title": "Filter" }, @@ -129,7 +128,7 @@ }, "offset": { "type": "array", - "default": [0, 0.0, 0], + "default": [ 0, 0.0, 0 ], "description": "The offset from the entity's anchor where the projectile will spawn.", "title": "Offset", "$ref": "../../../../general/vectors/number3.json" @@ -221,7 +220,7 @@ "additionalProperties": false, "properties": { "shape": { - "enum": ["sphere", "cube"], + "enum": [ "sphere", "cube" ], "default": "sphere", "description": "The shape of the area that is frozen.", "title": "Shape" @@ -429,8 +428,7 @@ }, "effect": { "title": "Effect", - "type": "string", - "default": "not set", + "$ref": "../../../../general/vanilla/effect.json", "description": "The identifier of the mob entity to affect." }, "visible": { @@ -490,7 +488,7 @@ "type": "object", "description": "Removes the projectile.", "additionalProperties": true, - "properties": {} + "properties": { } }, "spawn_aoe_cloud": { "title": "Spawn AOE Cloud", @@ -696,7 +694,6 @@ } }, "examples": [ - {}, { "anchor": 0, "angle_offset": 0, @@ -714,9 +711,9 @@ "lightning": false, "liquid_inertia": 0.6, "multiple_targets": true, - "offset": [], + "offset": [ ], "on_fire_time": 5, - "on_hit": {}, + "on_hit": { }, "particle": "iconcrack", "potion_effect": -1, "power": 1.3, diff --git a/source/behavior/entities/format/components/shooter.json b/source/behavior/entities/format/components/shooter.json index 66894cde..70e5071f 100644 --- a/source/behavior/entities/format/components/shooter.json +++ b/source/behavior/entities/format/components/shooter.json @@ -1,7 +1,6 @@ { "$id": "blockception.minecraft.behavior.entities.minecraft.shooter", "description": "Defines the entity's ranged attack behavior.", - "$comment": "As of 1.19.60 & out of exp 1.20.10", "type": "object", "title": "Shooter", "additionalProperties": false, @@ -15,7 +14,6 @@ "def": { "title": "Def", "type": "string", - "examples": ["minecraft:arrow", "minecraft:small_fireball", "minecraft:thrown_trident"], "description": "Actor definition to use as projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile" }, "magic": { diff --git a/source/behavior/entities/format/components/spawn_entity.json b/source/behavior/entities/format/components/spawn_entity.json index 802ec6f7..cdeb7fcc 100644 --- a/source/behavior/entities/format/components/spawn_entity.json +++ b/source/behavior/entities/format/components/spawn_entity.json @@ -46,7 +46,6 @@ }, "spawn_entity": { "type": "string", - "default": "", "description": "Identifier of the entity to spawn, leave empty to spawn the item defined above instead.", "title": "Spawn Entity" },