From ca1b07bc2d94e304629f35c74b419a9553609311 Mon Sep 17 00:00:00 2001 From: Xterionix <72647213+Xterionix@users.noreply.github.com> Date: Sun, 22 Sep 2024 16:25:16 +0500 Subject: [PATCH] Update from 1.21.0 to 1.21.30 (#307) * - Remove deprecated biome components * - Remove block hcf * - Add item specific destroy speeds * - Add owner distance filter * - Update scatter feature distribution property * - Add new entity components - Remove behavior.peek * - Add new item components - Remove hcf item stuff * - Remove volumes * - Add set_potion loot table function * - Mark fields as required * - Add item display transforms * - Add redstone conductivity block component * - Add is_navigating filter * - Fix move around target ref * - Add pack namespaced loot tables functions --- source/behavior/biomes/biomes.json | 2 - .../biomes/components/forced_features.json | 249 ------ .../components/ignore_automatic_features.json | 8 - .../components/destructible_by_mining.json | 43 +- .../components/redstone_conductivity.json | 22 + source/behavior/blocks/format/events.json | 43 -- .../blocks/format/events/add_mob_effect.json | 13 - .../behavior/blocks/format/events/damage.json | 12 - .../blocks/format/events/decrement_stack.json | 8 - source/behavior/blocks/format/events/die.json | 8 - .../blocks/format/events/play_effect.json | 12 - .../blocks/format/events/play_sound.json | 11 - .../format/events/remove_mob_effect.json | 16 - .../blocks/format/events/run_command.json | 16 - .../blocks/format/events/set_block.json | 15 - .../format/events/set_block_at_pos.json | 26 - .../format/events/set_block_property.json | 8 - .../blocks/format/events/spawn_loot.json | 11 - .../behavior/blocks/format/events/swing.json | 8 - .../blocks/format/events/teleport.json | 42 -- .../blocks/format/events/transform_item.json | 8 - .../blocks/format/minecraft.block.json | 23 +- .../blocks/format/triggers/on_fall_on.json | 27 - .../blocks/format/triggers/on_interact.json | 21 - .../blocks/format/triggers/on_placed.json | 21 - .../format/triggers/on_player_destroyed.json | 21 - .../format/triggers/on_player_placing.json | 21 - .../blocks/format/triggers/on_step_off.json | 21 - .../blocks/format/triggers/on_step_on.json | 21 - .../format/triggers/queued_ticking.json | 43 -- .../format/triggers/random_ticking.json | 31 - source/behavior/entities/filters/filters.json | 10 +- .../filters/filters/is_navigating.json | 31 + .../filters/filters/owner_distance.json | 26 + .../entities/filters/filters/types/test.json | 4 +- .../format/behaviors/fire_at_target.json | 90 +++ .../format/behaviors/follow_owner.json | 6 + .../format/behaviors/jump_around_target.json | 102 +++ .../format/behaviors/move_around_target.json | 54 ++ .../entities/format/behaviors/peek.json | 13 - .../format/behaviors/swim_up_for_breath.json | 36 + .../format/behaviors/teleport_to_owner.json | 24 + .../behavior/entities/format/components.json | 8 +- .../features/minecraft.scatter_feature.json | 98 +-- .../format/components/bundle_interaction.json | 14 + .../format/components/damage_absorption.json | 21 + .../format/components/durability_sensor.json | 23 + .../items/format/components/dyeable.json | 45 ++ .../items/format/components/rarity.json | 25 + .../items/format/components/storage_item.json | 50 ++ source/behavior/items/format/events.json | 84 --- .../items/format/events/add_mob_effect.json | 14 - .../behavior/items/format/events/damage.json | 12 - .../items/format/events/decrement_stack.json | 8 - .../format/events/remove_mob_effect.json | 12 - .../behavior/items/format/events/shoot.json | 23 - .../behavior/items/format/events/swing.json | 8 - .../items/format/events/teleport.json | 22 - .../items/format/events/transform_item.json | 9 - .../behavior/items/format/minecraft.item.json | 17 +- source/behavior/loot_tables/functions.json | 4 +- .../loot_tables/functions/set_potion.json | 64 ++ source/behavior/trading/trading.json | 13 +- source/behavior/volumes/1.17.0/volumes.json | 179 ----- source/behavior/volumes/volumes.json | 19 - source/compress_specification.json | 1 - .../models/entity/1.21.0/model_entity.json | 713 ++++++++++++++++++ .../resource/models/entity/model_entity.json | 10 +- 68 files changed, 1487 insertions(+), 1236 deletions(-) delete mode 100644 source/behavior/biomes/components/forced_features.json delete mode 100644 source/behavior/biomes/components/ignore_automatic_features.json create mode 100644 source/behavior/blocks/format/components/redstone_conductivity.json delete mode 100644 source/behavior/blocks/format/events.json delete mode 100644 source/behavior/blocks/format/events/add_mob_effect.json delete mode 100644 source/behavior/blocks/format/events/damage.json delete mode 100644 source/behavior/blocks/format/events/decrement_stack.json delete mode 100644 source/behavior/blocks/format/events/die.json delete mode 100644 source/behavior/blocks/format/events/play_effect.json delete mode 100644 source/behavior/blocks/format/events/play_sound.json delete mode 100644 source/behavior/blocks/format/events/remove_mob_effect.json delete mode 100644 source/behavior/blocks/format/events/run_command.json delete mode 100644 source/behavior/blocks/format/events/set_block.json delete mode 100644 source/behavior/blocks/format/events/set_block_at_pos.json delete mode 100644 source/behavior/blocks/format/events/set_block_property.json delete mode 100644 source/behavior/blocks/format/events/spawn_loot.json delete mode 100644 source/behavior/blocks/format/events/swing.json delete mode 100644 source/behavior/blocks/format/events/teleport.json delete mode 100644 source/behavior/blocks/format/events/transform_item.json delete mode 100644 source/behavior/blocks/format/triggers/on_fall_on.json delete mode 100644 source/behavior/blocks/format/triggers/on_interact.json delete mode 100644 source/behavior/blocks/format/triggers/on_placed.json delete mode 100644 source/behavior/blocks/format/triggers/on_player_destroyed.json delete mode 100644 source/behavior/blocks/format/triggers/on_player_placing.json delete mode 100644 source/behavior/blocks/format/triggers/on_step_off.json delete mode 100644 source/behavior/blocks/format/triggers/on_step_on.json delete mode 100644 source/behavior/blocks/format/triggers/queued_ticking.json delete mode 100644 source/behavior/blocks/format/triggers/random_ticking.json create mode 100644 source/behavior/entities/filters/filters/is_navigating.json create mode 100644 source/behavior/entities/filters/filters/owner_distance.json create mode 100644 source/behavior/entities/format/behaviors/fire_at_target.json create mode 100644 source/behavior/entities/format/behaviors/jump_around_target.json create mode 100644 source/behavior/entities/format/behaviors/move_around_target.json delete mode 100644 source/behavior/entities/format/behaviors/peek.json create mode 100644 source/behavior/entities/format/behaviors/swim_up_for_breath.json create mode 100644 source/behavior/entities/format/behaviors/teleport_to_owner.json create mode 100644 source/behavior/items/format/components/bundle_interaction.json create mode 100644 source/behavior/items/format/components/damage_absorption.json create mode 100644 source/behavior/items/format/components/durability_sensor.json create mode 100644 source/behavior/items/format/components/dyeable.json create mode 100644 source/behavior/items/format/components/rarity.json create mode 100644 source/behavior/items/format/components/storage_item.json delete mode 100644 source/behavior/items/format/events.json delete mode 100644 source/behavior/items/format/events/add_mob_effect.json delete mode 100644 source/behavior/items/format/events/damage.json delete mode 100644 source/behavior/items/format/events/decrement_stack.json delete mode 100644 source/behavior/items/format/events/remove_mob_effect.json delete mode 100644 source/behavior/items/format/events/shoot.json delete mode 100644 source/behavior/items/format/events/swing.json delete mode 100644 source/behavior/items/format/events/teleport.json delete mode 100644 source/behavior/items/format/events/transform_item.json create mode 100644 source/behavior/loot_tables/functions/set_potion.json delete mode 100644 source/behavior/volumes/1.17.0/volumes.json delete mode 100644 source/behavior/volumes/volumes.json create mode 100644 source/resource/models/entity/1.21.0/model_entity.json diff --git a/source/behavior/biomes/biomes.json b/source/behavior/biomes/biomes.json index 40fbc8090..0c6751ff5 100644 --- a/source/behavior/biomes/biomes.json +++ b/source/behavior/biomes/biomes.json @@ -19,9 +19,7 @@ "minecraft:capped_surface": { "$ref": "./components/capped_surface.json" }, "minecraft:climate": { "$ref": "./components/climate.json" }, "minecraft:consolidated_features": { "$ref": "./components/consolidated_features.json" }, - "minecraft:forced_features": { "$ref": "./components/forced_features.json" }, "minecraft:frozen_ocean_surface": { "$ref": "./components/frozen_ocean_surface.json" }, - "minecraft:ignore_automatic_features": { "$ref": "./components/ignore_automatic_features.json" }, "minecraft:legacy_world_generation_rules": { "$ref": "./components/legacy_world_generation_rules.json" }, diff --git a/source/behavior/biomes/components/forced_features.json b/source/behavior/biomes/components/forced_features.json deleted file mode 100644 index ad1110d5d..000000000 --- a/source/behavior/biomes/components/forced_features.json +++ /dev/null @@ -1,249 +0,0 @@ -{ - "$id": "minecraft.behavior.biomes.1.12.0.components.minecraft.forced_features", - "title": "Forced Features", - "description": "Force specific decorative features (trees, plants, etc.) to appear in this Biome, regardless of normal decoration rules.", - "type": "object", - "minProperties": 0, - "maxProperties": 11, - "additionalProperties": false, - "definitions": { - "coordinate": { - "oneOf": [ - { - "type": "string", - "$ref": "../../../molang/number.json", - "description": "Expression for the coordinate (evaluated each iteration). Mutually exclusive with random distribution object below." - }, - { - "type": "number", - "description": "Expression for the coordinate (evaluated each iteration). Mutually exclusive with random distribution object below." - }, - { - "type": "object", - "description": "Distribution for the coordinate (evaluated each iteration). Mutually exclusive with Molang expression above.", - "additionalProperties": false, - "required": ["distribution", "extent"], - "properties": { - "distribution": { - "title": "Distribution", - "description": "Type of distribution - uniform random, gaussian (centered in the range), or grid (either fixed-step or jittered).", - "type": "string", - "enum": ["uniform", "gaussian", "inverse_gaussian", "triangle", "fixed_grid", "jittered_grid"] - }, - "extent": { - "title": "Extent", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": [ - { - "title": "Lower Bound", - "description": "Lower bound (inclusive) of the scatter range, as an offset from the input point to scatter around.", - "$ref": "../../../molang/number.json" - }, - { - "title": "Upper Bound", - "description": "Upper bound (inclusive) of the scatter range, as an offset from the input point to scatter around.", - "$ref": "../../../molang/number.json" - } - ] - }, - "grid_offset": { - "title": "Step Size", - "description": "When the distribution type is grid, defines the offset along this axis.", - "type": "integer", - "minimum": 0 - }, - "step_size": { - "title": "Step Size", - "description": "When the distribution type is grid, defines the distance between steps along this axis.", - "type": "integer", - "minimum": 1 - } - } - } - ] - }, - "iteration": { - "title": "Iteration", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "additionalProperties": false, - "type": "object", - "required": ["iterations", "places_feature", "identifier"], - "properties": { - "coordinate_eval_order": { - "title": "Coordinate Eval Order", - "description": "The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to `xzy`.", - "type": "string", - "enum": ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"] - }, - "identifier": { - "title": "Identifier", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "string" - }, - "iterations": { - "title": "Iterations", - "description": "Number of scattered positions to generate.", - "$ref": "../../../molang/number.json" - }, - "places_feature": { - "title": "Places Feature", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "string" - }, - "scatter_chance": { - "title": "Scatter Chance", - "oneOf": [ - { - "type": "object", - "description": "Probability numerator / denominator that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.", - "additionalProperties": false, - "properties": { - "denominator": { - "title": "Denominator", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "integer", - "minimum": 1 - }, - "numerator": { - "title": "Numerator", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "integer", - "minimum": 1 - } - } - }, - { - "type": "string", - "description": "Probability (0-100) that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.", - "$ref": "../../../molang/number.json" - }, - { - "type": "number", - "description": "Probability (0-100) that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will." - } - ] - }, - "x": { - "title": "X", - "$ref": "#/definitions/coordinate" - }, - "y": { - "title": "X", - "$ref": "#/definitions/coordinate" - }, - "z": { - "title": "X", - "$ref": "#/definitions/coordinate" - } - } - } - }, - "properties": { - "after_sky_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "after_surface_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "after_underground_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "before_sky_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "before_surface_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "before_underground_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "final_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "first_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "surface_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "sky_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - }, - "underground_pass": { - "title": "First Pass", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "$ref": "#/definitions/iteration" - } - } - } -} diff --git a/source/behavior/biomes/components/ignore_automatic_features.json b/source/behavior/biomes/components/ignore_automatic_features.json deleted file mode 100644 index 0132964d3..000000000 --- a/source/behavior/biomes/components/ignore_automatic_features.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "minecraft.behavior.biomes.1.12.0.components.minecraft.ignore_automatic_features", - "title": "Ignore Automatic Features", - "description": "No features will be automatically attached to this Biome, only features specified in the minecraft:forced_features component will appear.", - "type": "object", - "additionalProperties": false, - "properties": {} -} diff --git a/source/behavior/blocks/format/components/destructible_by_mining.json b/source/behavior/blocks/format/components/destructible_by_mining.json index e838308d4..166d67740 100644 --- a/source/behavior/blocks/format/components/destructible_by_mining.json +++ b/source/behavior/blocks/format/components/destructible_by_mining.json @@ -10,13 +10,54 @@ { "type": "object", "additionalProperties": false, - "required": [], + "required": [ ], "properties": { "seconds_to_destroy": { "title": "Seconds To Destroy", "description": "Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.", "type": "number", "default": 0.0 + }, + "item_specific_speeds": { + "type": "array", + "title": "Item Specific Destroy Speeds", + "description": "Optional array of objects to describe item-specific block destroy speeds.", + "minItems": 1, + "items": { + "title": "Item Specific Destroy Speed", + "type": "object", + "additionalProperties": false, + "required": [ "item", "destroy_speed" ], + "properties": { + "item": { + "anyOf": [ + { + "title": "Item Identifer", + "description": "ItemDescriptor filtering for the item used while mining.", + "type": "string" + }, + { + "type": "object", + "description": "ItemDescriptor filtering for the item used while mining.", + "additionalProperties": false, + "properties": { + "tags": { + "title": "Tags", + "description": "Molang or tag", + "type": "string" + } + } + } + ] + }, + "destroy_speed": { + "title": "Destroy Speed", + "type": "number", + "description": "Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.", + "minimum": 0 + } + } + } } } } diff --git a/source/behavior/blocks/format/components/redstone_conductivity.json b/source/behavior/blocks/format/components/redstone_conductivity.json new file mode 100644 index 000000000..15e1e1006 --- /dev/null +++ b/source/behavior/blocks/format/components/redstone_conductivity.json @@ -0,0 +1,22 @@ +{ + "$id": "blockception.minecraft.behavior.blocks.minecraft.redstone_conductivity", + "title": "Redstone Conductivity", + "description": "The basic redstone properties of a block; if the component is not provided the default values are used. Requires the Upcoming Creator Features experiment.", + "type": "object", + "additionalProperties": false, + "required": [ ], + "properties": { + "allows_wire_to_step_down": { + "title": "Allows Wire To Step Down", + "description": "Specifies if redstone wire can stair-step downward on the block.", + "type": "boolean", + "default": true + }, + "redstone_conductor": { + "title": "Redstone Conductor", + "description": "Specifies if the block can be powered by redstone.", + "type": "boolean", + "default": false + } + } +} \ No newline at end of file diff --git a/source/behavior/blocks/format/events.json b/source/behavior/blocks/format/events.json deleted file mode 100644 index 8312ac159..000000000 --- a/source/behavior/blocks/format/events.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events", - "title": "Events", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "properties": { - "minecraft:on_fall_on": { "$ref": "#/definitions/event_base" }, - "minecraft:on_interact": { "$ref": "#/definitions/event_base" }, - "minecraft:on_placed": { "$ref": "#/definitions/event_base" }, - "minecraft:on_player_destroyed": { "$ref": "#/definitions/event_base" }, - "minecraft:on_player_placing": { "$ref": "#/definitions/event_base" }, - "minecraft:on_step_off": { "$ref": "#/definitions/event_base" }, - "minecraft:on_step_on": { "$ref": "#/definitions/event_base" } - }, - "definitions": { - "event_base": { - "title": "Event", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "condition": { - "title": "Condition", - "description": "The condition of event to be executed on the block.", - "type": "string" - }, - "event": { - "title": "Event", - "description": "The event executed on the block.", - "type": "string" - }, - "target": { - "title": "Target", - "description": "The target of event executed on the block.", - "type": "string", - "default": "self" - } - } - } - } -} diff --git a/source/behavior/blocks/format/events/add_mob_effect.json b/source/behavior/blocks/format/events/add_mob_effect.json deleted file mode 100644 index 3967fd44b..000000000 --- a/source/behavior/blocks/format/events/add_mob_effect.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.add_mob_effect", - "type": "object", - "description": "Apply mob effect to target.", - "title": "Add Mob Effect", - "additionalProperties": false, - "properties": { - "amplifier": { "type": "integer", "default": 0, "description": "The amplifier for the mob effect.", "title": "Amplifier" }, - "duration": { "type": "number", "default": 0, "description": "The duration of the mob effect.", "title": "Duration" }, - "effect": { "type": "string", "default": "", "description": "The mob effect to apply.", "title": "Effect" }, - "target": { "type": "object", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/damage.json b/source/behavior/blocks/format/events/damage.json deleted file mode 100644 index b9277ac9f..000000000 --- a/source/behavior/blocks/format/events/damage.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.damage", - "type": "object", - "description": "Deals damage to the target.", - "title": "Damage", - "additionalProperties": false, - "properties": { - "amount": { "type": "integer", "default": 0, "description": "The amount of damage to deal.", "title": "Amount" }, - "target": { "type": "object", "default": "self", "description": "The target context to execute against.", "title": "Target" }, - "type": { "type": "string", "default": "", "description": "The type of damage to deal.", "title": "Type" } - } -} diff --git a/source/behavior/blocks/format/events/decrement_stack.json b/source/behavior/blocks/format/events/decrement_stack.json deleted file mode 100644 index 34eb1fbe4..000000000 --- a/source/behavior/blocks/format/events/decrement_stack.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.decrement_stack", - "type": "object", - "description": "Decrement item stack.", - "title": "Decrement Stack", - "additionalProperties": false, - "properties": {} -} diff --git a/source/behavior/blocks/format/events/die.json b/source/behavior/blocks/format/events/die.json deleted file mode 100644 index d8196e8f3..000000000 --- a/source/behavior/blocks/format/events/die.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.die", - "type": "object", - "description": "Kill target. If target is self and this is run from a block then destroy the block.", - "title": "Die", - "additionalProperties": false, - "properties": { "target": { "type": "object", "default": "self", "description": "The target context to execute against.", "title": "Target" } } -} diff --git a/source/behavior/blocks/format/events/play_effect.json b/source/behavior/blocks/format/events/play_effect.json deleted file mode 100644 index 6c3037c17..000000000 --- a/source/behavior/blocks/format/events/play_effect.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.play_effect", - "type": "object", - "description": "Spawns a particle effect relative to target position.", - "title": "Play Effect", - "additionalProperties": false, - "properties": { - "data": { "type": "integer", "default": 0, "description": "Particle data value.", "title": "Data" }, - "effect": { "type": "string", "default": "", "description": "The name of the particle effect to create.", "title": "Effect" }, - "target": { "type": "object", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/play_sound.json b/source/behavior/blocks/format/events/play_sound.json deleted file mode 100644 index 87af7ba46..000000000 --- a/source/behavior/blocks/format/events/play_sound.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.playsound", - "type": "object", - "description": "Play a sound relative to target position.", - "title": "Playsound", - "additionalProperties": false, - "properties": { - "sound": { "type": "string", "default": "", "description": "The name of the sound to play.", "title": "Sound" }, - "target": { "type": "object", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/remove_mob_effect.json b/source/behavior/blocks/format/events/remove_mob_effect.json deleted file mode 100644 index 466e01697..000000000 --- a/source/behavior/blocks/format/events/remove_mob_effect.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.remove_mob_effect", - "type": "object", - "description": "Removes mob effect from target.", - "title": "Remove Mob Effect", - "additionalProperties": false, - "properties": { - "effect": { - "type": "string", - "default": "", - "description": "The mob effect to remove. Use `all` to remove all mob effects from target.", - "title": "Effect" - }, - "target": { "type": "string", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/run_command.json b/source/behavior/blocks/format/events/run_command.json deleted file mode 100644 index 4602b450c..000000000 --- a/source/behavior/blocks/format/events/run_command.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.run_command", - "type": "object", - "description": "Triggers a slash command or a list of slash commands.", - "title": "Run Command", - "additionalProperties": false, - "properties": { - "command": { - "default": "", - "description": "Slash command to run.", - "title": "Command", - "oneof": [{ "type": "string" }, { "type": "array", "items": { "type": "string", "title": "Command", "description": "Slash command to run." } }] - }, - "target": { "type": "string", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/set_block.json b/source/behavior/blocks/format/events/set_block.json deleted file mode 100644 index 62f504a63..000000000 --- a/source/behavior/blocks/format/events/set_block.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.set_block", - "type": "object", - "description": "Sets this block to another block type.", - "title": "Set Block", - "additionalProperties": false, - "properties": { - "block_type": { - "$ref": "../../../../general/block/reference.json", - "default": "", - "description": "The type of block to set.", - "title": "Block Type" - } - } -} diff --git a/source/behavior/blocks/format/events/set_block_at_pos.json b/source/behavior/blocks/format/events/set_block_at_pos.json deleted file mode 100644 index 4c3819589..000000000 --- a/source/behavior/blocks/format/events/set_block_at_pos.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.set_block_at_pos", - "type": "object", - "description": "Sets a block relative to this block to another block type.", - "title": "Set Block At Pos", - "additionalProperties": false, - "properties": { - "block_offset": { - "type": "array", - "default": [0.0, 0.0, 0.0], - "description": "The offset from the block's center.", - "title": "Block Offset", - "items": [ - { "type": "number", "title": "X", "description": "The x offset from the block's center." }, - { "type": "number", "title": "Y", "description": "The y offset from the block's center." }, - { "type": "number", "title": "Z", "description": "The z offset from the block's center." } - ] - }, - "block_type": { - "$ref": "../../../../general/block/reference.json", - "default": "", - "description": "The type of block to set.", - "title": "Block Type" - } - } -} diff --git a/source/behavior/blocks/format/events/set_block_property.json b/source/behavior/blocks/format/events/set_block_property.json deleted file mode 100644 index 0a788b6d0..000000000 --- a/source/behavior/blocks/format/events/set_block_property.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.set_block_property", - "type": "object", - "description": "Sets a block property on this block.", - "title": "Set Block Property", - "additionalProperties": false, - "properties": { "property": { "type": "string", "description": "Block property to set on the block.", "title": "Property" } } -} diff --git a/source/behavior/blocks/format/events/spawn_loot.json b/source/behavior/blocks/format/events/spawn_loot.json deleted file mode 100644 index e11ba4cea..000000000 --- a/source/behavior/blocks/format/events/spawn_loot.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.spawn_loot", - "type": "object", - "description": "Spawn loot from block.", - "title": "Spawn Loot", - "required": ["table"], - "additionalProperties": false, - "properties": { - "table": { "type": "string", "description": "File path, relative to the Behavior Pack's path, to the loot table file.", "title": "Table" } - } -} diff --git a/source/behavior/blocks/format/events/swing.json b/source/behavior/blocks/format/events/swing.json deleted file mode 100644 index 71d5747f0..000000000 --- a/source/behavior/blocks/format/events/swing.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.swing", - "type": "object", - "description": "Event causes the actor to swing.", - "title": "Swing", - "additionalProperties": false, - "properties": {} -} diff --git a/source/behavior/blocks/format/events/teleport.json b/source/behavior/blocks/format/events/teleport.json deleted file mode 100644 index df928754a..000000000 --- a/source/behavior/blocks/format/events/teleport.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.teleport", - "type": "object", - "description": "Teleport target randomly around destination point.", - "title": "Teleport", - "additionalProperties": false, - "properties": { - "avoid_water": { - "type": "boolean", - "default": true, - "description": "Determines if the teleport avoids putting the target in water.", - "title": "Avoid Water" - }, - "destination": { - "default": [0.0, 0.0, 0.0], - "description": "Origin destination of the teleport.", - "title": "Destination", - "items": [ - { "type": "number", "title": "X", "description": "The x offset from the block's center." }, - { "type": "number", "title": "Y", "description": "The y offset from the block's center." }, - { "type": "number", "title": "Z", "description": "The z offset from the block's center." } - ] - }, - "land_on_block": { - "type": "boolean", - "default": true, - "description": "Determines if the teleport places the target on a block.", - "title": "Land On Block" - }, - "max_range": { - "default": [8.0, 8.0, 8.0], - "description": "Maximum range the target can teleport relative to the origin destination.", - "title": "Maximum Range", - "items": [ - { "type": "number", "title": "X", "description": "The x offset from the block's center." }, - { "type": "number", "title": "Y", "description": "The y offset from the block's center." }, - { "type": "number", "title": "Z", "description": "The z offset from the block's center." } - ] - }, - "target": { "type": "string", "default": "self", "description": "The target context to execute against.", "title": "Target" } - } -} diff --git a/source/behavior/blocks/format/events/transform_item.json b/source/behavior/blocks/format/events/transform_item.json deleted file mode 100644 index 7d5708716..000000000 --- a/source/behavior/blocks/format/events/transform_item.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.block.events.transform_item", - "type": "object", - "description": "Transforms item into another item.", - "title": "Transform Item", - "additionalProperties": false, - "properties": { "transform": { "type": "string", "description": "Name of the item it should transform into.", "title": "Transform" } } -} diff --git a/source/behavior/blocks/format/minecraft.block.json b/source/behavior/blocks/format/minecraft.block.json index e2b50c8aa..c1ae2d553 100644 --- a/source/behavior/blocks/format/minecraft.block.json +++ b/source/behavior/blocks/format/minecraft.block.json @@ -5,7 +5,7 @@ "description": "A custom block definition.", "type": "object", "additionalProperties": false, - "required": ["description", "components"], + "required": [ "description", "components" ], "definitions": { "components_ref": { "type": "object", @@ -29,22 +29,12 @@ "minecraft:map_color": { "$ref": "./components/map_color.json" }, "minecraft:material_instances": { "$ref": "./components/material_instances.json" }, "minecraft:placement_filter": { "$ref": "./components/placement_filter.json" }, + "minecraft:redstone_conductivity": { "$ref": "./components/redstone_conductivity.json" }, "minecraft:selection_box": { "$ref": "./components/selection_box.json" }, "minecraft:transformation": { "$ref": "./components/transformation.json" }, "minecraft:custom_components": { "$ref": "./components/custom_components.json" }, "minecraft:tick": { "$ref": "./components/tick.json" }, - "minecraft:entity_fall_on": { "$ref": "./components/entity_fall_on.json" }, - - //Triggers - "minecraft:on_fall_on": { "$ref": "./triggers/on_fall_on.json" }, - "minecraft:on_interact": { "$ref": "./triggers/on_interact.json" }, - "minecraft:on_placed": { "$ref": "./triggers/on_placed.json" }, - "minecraft:on_player_destroyed": { "$ref": "./triggers/on_player_destroyed.json" }, - "minecraft:on_player_placing": { "$ref": "./triggers/on_player_placing.json" }, - "minecraft:on_step_off": { "$ref": "./triggers/on_step_off.json" }, - "minecraft:on_step_on": { "$ref": "./triggers/on_step_on.json" }, - "minecraft:queued_ticking": { "$ref": "./triggers/queued_ticking.json" }, - "minecraft:random_ticking": { "$ref": "./triggers/random_ticking.json" } + "minecraft:entity_fall_on": { "$ref": "./components/entity_fall_on.json" } }, "patternProperties": { "tag:.+": { @@ -88,7 +78,7 @@ "description": "The description for this block.", "type": "object", "additionalProperties": false, - "required": ["identifier"], + "required": [ "identifier" ], "properties": { "identifier": { "title": "Identifier", @@ -100,9 +90,9 @@ "title": "Menu Category", "description": "Specifies the menu category and group for the block, which determine where this block is placed in the inventory and crafting table container screens. If this field is omitted, the block will not appear in the inventory or crafting table container screens.", "type": "object", - "examples": [{ "category": "construction" }], + "examples": [ { "category": "construction" } ], "additionalProperties": false, - "required": ["category"], + "required": [ "category" ], "properties": { "category": { "$ref": "../../../general/vanilla/creative_category.json" @@ -122,7 +112,6 @@ "traits": { "$ref": "#/definitions/traits_ref" } } }, - "events": { "$ref": "./events.json" }, "components": { "$ref": "#/definitions/components_ref" }, "permutations": { "type": "array", diff --git a/source/behavior/blocks/format/triggers/on_fall_on.json b/source/behavior/blocks/format/triggers/on_fall_on.json deleted file mode 100644 index 5c49f7a82..000000000 --- a/source/behavior/blocks/format/triggers/on_fall_on.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_fall_on", - "type": "object", - "title": "On Fall On", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "min_fall_distance": { - "type": "number", - "default": 0, - "description": "The minimum distance in blocks that an actor needs to fall to trigger this event.", - "title": "Minimum Fall Distance" - }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_interact.json b/source/behavior/blocks/format/triggers/on_interact.json deleted file mode 100644 index c6d617a3e..000000000 --- a/source/behavior/blocks/format/triggers/on_interact.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_interact", - "type": "object", - "title": "On Fall On", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_placed.json b/source/behavior/blocks/format/triggers/on_placed.json deleted file mode 100644 index 653a3e296..000000000 --- a/source/behavior/blocks/format/triggers/on_placed.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_placed", - "type": "object", - "title": "On Placed", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_player_destroyed.json b/source/behavior/blocks/format/triggers/on_player_destroyed.json deleted file mode 100644 index e91b5849c..000000000 --- a/source/behavior/blocks/format/triggers/on_player_destroyed.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_player_destroyed", - "type": "object", - "title": "On Player Destroyed", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_player_placing.json b/source/behavior/blocks/format/triggers/on_player_placing.json deleted file mode 100644 index ef6ea1575..000000000 --- a/source/behavior/blocks/format/triggers/on_player_placing.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_player_placing", - "type": "object", - "title": "On Player Placing", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_step_off.json b/source/behavior/blocks/format/triggers/on_step_off.json deleted file mode 100644 index 8df58b868..000000000 --- a/source/behavior/blocks/format/triggers/on_step_off.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_step_off", - "type": "object", - "title": "On Step Off", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/on_step_on.json b/source/behavior/blocks/format/triggers/on_step_on.json deleted file mode 100644 index 388457538..000000000 --- a/source/behavior/blocks/format/triggers/on_step_on.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.on_step_on", - "type": "object", - "title": "On Step On", - "description": "[Experimental] Describes event for this block.", - "properties": { - "condition": { - "type": "string", - "default": "", - "description": "The condition of event to be executed on the block.", - "title": "Condition" - }, - "event": { "type": "string", "default": "", "description": "The event executed on the block.", "title": "Event" }, - "target": { - "type": "string", - "default": "self", - "description": "The target of event executed on the block.", - "title": "Target" - } - } -} diff --git a/source/behavior/blocks/format/triggers/queued_ticking.json b/source/behavior/blocks/format/triggers/queued_ticking.json deleted file mode 100644 index d43bbd178..000000000 --- a/source/behavior/blocks/format/triggers/queued_ticking.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.queued_ticking", - "title": "Queued Ticking", - "description": "[Experimental] Describes the component that will trigger an even at a regular interval between two values.", - "type": "object", - "additionalProperties": false, - "properties": { - "on_tick": { - "title": "On Tick", - "description": "Describes the component that will trigger an even at a regular interval between two values.", - "type": "string", - "additionalProperties": false, - "properties": { - "condition": { - "title": "Condition", - "type": "string", - "default": "1", - "description": "The condition of event to be executed on the block. Molang" - }, - "event": { - "title": "Event", - "type": "string", - "default": "set_block_property", - "description": "The type of event executed on the block." - }, - "range": { "title": "Range", "type": "array", "items": [{ "type": "integer" }, { "type": "integer" }] }, - "target": { - "title": "Target", - "description": "The target of event executed on the block.", - "type": "string", - "enum": ["block", "damager", "other", "parent", "player", "self", "target"] - } - } - }, - "looping": { "type": "boolean", "default": true, "description": "Does the event loop.", "title": "Looping" }, - "range": { - "type": "array", - "default": [10, 10], - "description": "The Range between which the component will trigger his event.", - "title": "Range" - } - } -} diff --git a/source/behavior/blocks/format/triggers/random_ticking.json b/source/behavior/blocks/format/triggers/random_ticking.json deleted file mode 100644 index beee36f10..000000000 --- a/source/behavior/blocks/format/triggers/random_ticking.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.blocks.minecraft.random_ticking", - "title": "Random Ticking", - "description": "[Experimental] Triggers the specified event randomly based on the random tick speed gamerule. The random tick speed determines how often blocks are updated.", - "type": "object", - "additionalProperties": false, - "properties": { - "on_tick": { - "title": "On Tick", - "description": "the event that will be triggered on random ticks." - }, - "condition": { - "title": "Condition", - "type": "string", - "default": "1", - "description": "A condition using Molang queries that results to true/false. If true on the random tick, the event will be triggered. If false on the random tick, the event will not be triggered." - }, - "event": { - "title": "Event", - "type": "string", - "default": "set_block_property", - "description": "The event that will be triggered." - }, - "target": { - "title": "Target", - "type": "string", - "default": "self", - "description": "The target of the event executed by the block" - } - } -} diff --git a/source/behavior/entities/filters/filters.json b/source/behavior/entities/filters/filters.json index 449d3f520..28f777649 100644 --- a/source/behavior/entities/filters/filters.json +++ b/source/behavior/entities/filters/filters.json @@ -2,7 +2,7 @@ "$id": "blockception.minecraft.behavior.entities.minecraft.filters", "title": "Filters", "$ref": "#/definitions/groups_spec", - "examples": [{ "test": "is_family", "subject": "other", "value": "example" }, { "test": "has_tag", "value": "example" }, []], + "examples": [ { "test": "is_family", "subject": "other", "value": "example" }, { "test": "has_tag", "value": "example" }, [ ] ], "definitions": { "filters_spec": { "defaultSnippets": [ @@ -38,10 +38,10 @@ } } ], - "examples": [{ "all_of": [{}] }, { "any_of": [{}] }, { "none_of": [{}] }], + "examples": [ { "all_of": [ { } ] }, { "any_of": [ { } ] }, { "none_of": [ { } ] } ], "oneOf": [ { - "propertyNames": { "enum": ["all_of", "any_of", "none_of"] }, + "propertyNames": { "enum": [ "all_of", "any_of", "none_of" ] }, "properties": { "all_of": { "title": "All Of", @@ -61,7 +61,7 @@ } }, { - "required": ["test"], + "required": [ "test" ], "properties": { "all_of": { "title": "All Of", @@ -134,6 +134,7 @@ { "if": { "properties": { "test": { "const": "is_mark_variant" } } }, "then": { "$ref": "./filters/is_mark_variant.json" } }, { "if": { "properties": { "test": { "const": "is_missing_health" } } }, "then": { "$ref": "./filters/is_missing_health.json" } }, { "if": { "properties": { "test": { "const": "is_moving" } } }, "then": { "$ref": "./filters/is_moving.json" } }, + { "if": { "properties": { "test": { "const": "is_navigating" } } }, "then": { "$ref": "./filters/is_moving.json" } }, { "if": { "properties": { "test": { "const": "is_owner" } } }, "then": { "$ref": "./filters/is_owner.json" } }, { "if": { "properties": { "test": { "const": "is_persistent" } } }, "then": { "$ref": "./filters/is_persistent.json" } }, { "if": { "properties": { "test": { "const": "is_riding" } } }, "then": { "$ref": "./filters/is_riding.json" } }, @@ -161,6 +162,7 @@ { "if": { "properties": { "test": { "const": "surface_mob" } } }, "then": { "$ref": "./filters/surface_mob.json" } }, { "if": { "properties": { "test": { "const": "taking_fire_damage" } } }, "then": { "$ref": "./filters/taking_fire_damage.json" } }, { "if": { "properties": { "test": { "const": "target_distance" } } }, "then": { "$ref": "./filters/target_distance.json" } }, + { "if": { "properties": { "test": { "const": "owner_distance" } } }, "then": { "$ref": "./filters/owner_distance.json" } }, { "if": { "properties": { "test": { "const": "trusts" } } }, "then": { "$ref": "./filters/trusts.json" } }, { "if": { "properties": { "test": { "const": "weather_at_position" } } }, "then": { "$ref": "./filters/weather_at_position.json" } }, { "if": { "properties": { "test": { "const": "weather" } } }, "then": { "$ref": "./filters/weather.json" } }, diff --git a/source/behavior/entities/filters/filters/is_navigating.json b/source/behavior/entities/filters/filters/is_navigating.json new file mode 100644 index 000000000..2f9ad2a83 --- /dev/null +++ b/source/behavior/entities/filters/filters/is_navigating.json @@ -0,0 +1,31 @@ +{ + "$id": "blockception.minecraft.behavior.entities.filters.is_navigating", + "type": "object", + "title": "Is Navigating", + "description": "Returns true if the subject entity is navigating.", + "properties": { + "test": { + "type": "string", + "title": "Test Property", + "description": "The test property." + }, + "operator": { + "$ref": "./types/operator.json" + }, + "subject": { + "$ref": "./types/subject.json" + }, + "value": { + "title": "Value", + "description": "True or false.", + "type": "boolean", + "default": true + } + }, + "examples": [ + { + "test": "is_navigating", + "value": true + } + ] +} diff --git a/source/behavior/entities/filters/filters/owner_distance.json b/source/behavior/entities/filters/filters/owner_distance.json new file mode 100644 index 000000000..b0b6b39e3 --- /dev/null +++ b/source/behavior/entities/filters/filters/owner_distance.json @@ -0,0 +1,26 @@ +{ + "$id": "blockception.minecraft.behavior.entities.filters.owner_distance", + "type": "object", + "title": "Owner Distance", + "description": "Tests the distance between the subject and its owner. Returns false if there is no owner.", + "required": ["value"], + "properties": { + "test": { + "type": "string", + "title": "Test", + "description": "The test property." + }, + "operator": { + "$ref": "./types/operator.json" + }, + "subject": { + "$ref": "./types/subject.json" + }, + "value": { + "description": "(Required) A floating point value.", + "type": "number", + "default": true, + "title": "Value" + } + } +} diff --git a/source/behavior/entities/filters/filters/types/test.json b/source/behavior/entities/filters/filters/types/test.json index aeb2db431..3ac3092fb 100644 --- a/source/behavior/entities/filters/filters/types/test.json +++ b/source/behavior/entities/filters/filters/types/test.json @@ -38,6 +38,7 @@ "is_leashed", "is_mark_variant", "is_moving", + "is_navigating", "is_owner", "is_riding", "is_skin_id", @@ -53,6 +54,7 @@ "moon_intensity", "moon_phase", "on_ground", - "on_ladder" + "on_ladder", + "owner_distance" ] } diff --git a/source/behavior/entities/format/behaviors/fire_at_target.json b/source/behavior/entities/format/behaviors/fire_at_target.json new file mode 100644 index 000000000..0072e578d --- /dev/null +++ b/source/behavior/entities/format/behaviors/fire_at_target.json @@ -0,0 +1,90 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.fire_at_target", + "description": "Allows an entity to attack by firing a shot with a delay. Anchor and offset parameters of this component overrides the anchor and offset from projectile component.", + "type": "object", + "title": "Fire At Target", + "additionalProperties": false, + "required": [ ], + "properties": { + "priority": { "$ref": "types/priority.json" }, + "attack_cooldown": { + "title": "Attack Cooldown", + "type": "number", + "default": 0.5, + "description": "The cooldown time in seconds before this goal can be used again." + }, + "attack_range": { + "title": "Attack Range", + "$ref": "../../../../general/vectors/number3.json", + "description": "Target needs to be within this range for the attack to happen." + }, + "owner_anchor": { + "title": "Owner Anchor", + "type": "integer", + "default": 2, + "description": "Entity anchor for the projectile spawn location." + }, + "owner_offset": { + "title": "Owner Offset", + "description": "Offset vector from the owner_anchor.", + "$ref": "../../../../general/vectors/number3.json" + }, + "target_anchor": { + "title": "Target Anchor", + "type": "integer", + "default": 2, + "description": "Entity anchor for projectile target." + }, + "target_offset": { + "title": "Target Offset", + "description": "Offset vector from the target_anchor.", + "$ref": "../../../../general/vectors/number3.json" + }, + "post_shoot_delay": { + "title": "Post Shoot Delay", + "type": "number", + "default": 0.2, + "description": "Time in seconds between firing the projectile and ending the goal." + }, + "pre_shoot_delay": { + "title": "Pre Shoot Delay", + "type": "number", + "default": 0.75, + "description": "Time in seconds before firing the projectile." + }, + "projectile_def": { + "title": "Projectile Definition", + "type": "string", + "description": "Actor definition to use as projectile for the ranged attack. The actor must be a projectile." + }, + "ranged_fov": { + "title": "Ranged Fov", + "type": "number", + "default": 90, + "minimum": 0, + "maximum": 360, + "description": "Field of view (in degrees) when using sensing to detect a target for attack." + }, + "max_head_rotation_x": { + "title": "Max Head Rotation X", + "type": "number", + "default": 30, + "minimum": 0, + "maximum": 360, + "description": "Maximum head rotation (in degrees), on the X-axis, that this entity can apply while trying to look at the target." + }, + "max_head_rotation_y": { + "title": "Max Head Rotation Y", + "type": "number", + "default": 30, + "minimum": 0, + "maximum": 360, + "description": "Maximum head rotation (in degrees), on the Y-axis, that this entity can apply while trying to look at the target." + }, + "filters": { + "title": "Filters", + "description": "Conditions that need to be met for the behavior to start.", + "$ref": "../../filters/filters.json" + } + } +} diff --git a/source/behavior/entities/format/behaviors/follow_owner.json b/source/behavior/entities/format/behaviors/follow_owner.json index aa377018a..51fa3a4cb 100644 --- a/source/behavior/entities/format/behaviors/follow_owner.json +++ b/source/behavior/entities/format/behaviors/follow_owner.json @@ -9,6 +9,12 @@ "priority": { "$ref": "types/priority.json" }, + "post_teleport_distance": { + "title": "Post Teleport Distance", + "description": "Defines how far (in blocks) the entity will be from its owner after teleporting. If not specified, it defaults to \"stop_distance\" + 1, allowing the entity to seamlessly resume navigation.", + "type": "number", + "minimum": 3 + }, "speed_multiplier": { "$ref": "./types/speed_multiplier.json" }, diff --git a/source/behavior/entities/format/behaviors/jump_around_target.json b/source/behavior/entities/format/behaviors/jump_around_target.json new file mode 100644 index 000000000..3719ae065 --- /dev/null +++ b/source/behavior/entities/format/behaviors/jump_around_target.json @@ -0,0 +1,102 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.jump_around_target", + "type": "object", + "title": "Jump Around Target", + "additionalProperties": false, + "description": "Allows an entity to jump around a target.", + "required": [ ], + "properties": { + "priority": { "$ref": "./types/priority.json" }, + "check_collision": { + "title": "Check Collision", + "type": "boolean", + "default": false, + "description": "Enables collision checks when calculating the jump. Setting check_collision to true may affect performance and should be used with care." + }, + "entity_bounding_box_scale": { + "title": "Entity Bounding Box Scale", + "default": 0.7, + "description": "Scaling temporarily applied to the entity's AABB bounds when jumping. A smaller bounding box reduces the risk of collisions during the jump. When check_collision is true it also increases the chance of being able to jump when close to obstacles." + }, + "jump_angles": { + "title": "Jump Angles", + "type": "array", + "default": [ 40.0, 55.0, 60.0, 75.0, 80.0 ], + "items": { + "type": "number" + }, + "description": "The jump angles in float degrees that are allowed when performing the jump. The order in which the angles are chosen is randomized." + }, + "jump_cooldown_duration": { + "title": "Jump Cooldown Duration", + "type": "number", + "default": 0.5, + "description": "The time in seconds to spend in cooldown before this goal can be used again." + }, + "jump_cooldown_when_hurt_duration": { + "title": "Jump Cooldown When Hurt Duration", + "type": "number", + "default": 0.1, + "description": "The time in seconds to spend in cooldown after being hurt before this goal can be used again." + }, + "landing_distance_from_target": { + "title": "Vertical Search Distance", + "description": "The range deciding how close to and how far away from the target the landing position can be when jumping.", + "$ref": "../../../../general/vectors/number2.json" + }, + "landing_position_spread_degrees": { + "title": "Landing Position Spread Degrees", + "type": "integer", + "default": 90, + "minimum": 0, + "maximum": 360, + "description": "This angle (in degrees) is used for controlling the spread when picking a landing position behind the target. A zero spread angle means the landing position will be straight behind the target with no variance. A 90 degree spread angle means the landing position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction." + }, + "last_hurt_duration": { + "title": "Last Hurt Duration", + "type": "number", + "default": 2.0, + "description": "If the entity was hurt within these last seconds, the jump_cooldown_when_hurt_duration will be used instead of jump_cooldown_duration." + }, + "line_of_sight_obstruction_height_ignore": { + "title": "Line Of Sight Obstruction Height Ignore", + "type": "integer", + "default": 4, + "description": "If the entity's line of sight towards its target is obstructed by an obstacle with a height below this number, the obstacle will be ignored, and the goal will try to find a valid landing position." + }, + "max_jump_velocity": { + "title": "Max Jump Velocity", + "type": "number", + "default": 1.4, + "description": "Maximum velocity a jump can be performed at." + }, + "prepare_jump_duration": { + "title": "Prepare Jump Duration", + "type": "number", + "default": 0.5, + "description": "The time in seconds to spend preparing for the jump." + }, + "required_vertical_space": { + "title": "Require Vertical Space", + "type": "integer", + "default": 4, + "description": "The number of blocks above the entity's head that has to be air for this goal to be usable." + }, + "snap_to_surface_block_range": { + "title": "Snap To Surface Block Range", + "type": "integer", + "default": 10, + "description": "The number of blocks above and below from the jump target position that will be checked to find a surface to land on." + }, + "valid_distance_to_target": { + "title": "Valid Distance To Target", + "description": "Target needs to be within this range for the jump to happen.", + "$ref": "../../../../general/vectors/number2.json" + }, + "filters": { + "title": "Filters", + "description": "Conditions that need to be met for the behavior to start.", + "$ref": "../../filters/filters.json" + } + } +} diff --git a/source/behavior/entities/format/behaviors/move_around_target.json b/source/behavior/entities/format/behaviors/move_around_target.json new file mode 100644 index 000000000..3841f49c5 --- /dev/null +++ b/source/behavior/entities/format/behaviors/move_around_target.json @@ -0,0 +1,54 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.move_around_target", + "type": "object", + "title": "Move Around Target", + "additionalProperties": false, + "description": "Allows an entity to move around a target. If the entity is too close (i.e. closer than destination range min and height difference limit) it will try to move away from its target. If the entity is too far away from its target it will try to move closer to a random position within the destination range. A randomized amount of those positions will be behind the target, and the spread can be tweaked with 'destination_pos_search_spread_degrees'.", + "required": [], + "properties": { + "priority": { "$ref": "./types/priority.json" }, + "destination_pos_search_spread_degrees": { + "title": "Desitnation Pos Search Spread Degrees", + "type": "number", + "default": 90.0, + "minimum": 0, + "maximum": 360, + "description": "This angle (in degrees) is used for controlling the spread when picking a destination position behind the target. A zero spread angle means the destination position will be straight behind the target with no variance. A 90 degree spread angle means the destination position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction." + }, + "destination_position_range": { + "title": "Desitnation Position Range", + "default": [4.0, 8.0], + "description": "The range of distances from the target entity within which the goal should look for a position to move the owner entity to.", + "$ref": "../../../../general/vectors/number2.json" + }, + "height_difference_limit": { + "title": "Height Difference Limit", + "type": "number", + "default": 10.0, + "description": "Distance in height (in blocks) between the owner entity and the target has to be less than this value when owner checks if it is too close and should move away from the target. This value needs to be bigger than zero for the move away logic to trigger." + }, + "horizontal_search_distance": { + "title": "Horizontal Search Distance", + "type": "integer", + "default": 5, + "description": "Horizontal search distance (in blocks) when searching for a position to move away from target." + }, + "movement_speed": { + "title": "Movement Speed", + "type": "number", + "default": 0.6, + "description": "The speed with which the entity should move to its target position." + }, + "vertical_search_distance": { + "title": "Vertical Search Distance", + "type": "integer", + "default": 5, + "description": "Number of ticks needed to complete a stay at the block." + }, + "filters": { + "title": "Filters", + "description": "Conditions that need to be met for the behavior to start.", + "$ref": "../../filters/filters.json" + } + } +} diff --git a/source/behavior/entities/format/behaviors/peek.json b/source/behavior/entities/format/behaviors/peek.json deleted file mode 100644 index 0386bf40d..000000000 --- a/source/behavior/entities/format/behaviors/peek.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.peek", - "description": "Allows the mob to peek out. This is what the shulker uses to look out of its shell.", - "type": "object", - "title": "Peek", - "additionalProperties": false, - "required": [], - "properties": { - "priority": { - "$ref": "./types/priority.json" - } - } -} diff --git a/source/behavior/entities/format/behaviors/swim_up_for_breath.json b/source/behavior/entities/format/behaviors/swim_up_for_breath.json new file mode 100644 index 000000000..00690c9f5 --- /dev/null +++ b/source/behavior/entities/format/behaviors/swim_up_for_breath.json @@ -0,0 +1,36 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.swim_up_for_breath", + "description": "Allows the mob to try to move to air once it is close to running out of its total breathable supply.", + "type": "object", + "title": "Swim Up For Breath", + "additionalProperties": false, + "properties": { + "priority": { + "$ref": "types/priority.json" + }, + "material_type": { + "title": "Idle Time", + "enum": ["water", "lava","any"], + "description": "The material the mob is traveling in. An air block will only be considered valid to move to with a block of this material below it.", + "default": "water" + }, + "search_height": { + "type": "integer", + "title": "Search Height", + "default": 16, + "description": "The height (in blocks) above the mob's current position that it will search for a valid air block to move to. If a valid block cannot be found, the mob will move to the position this many blocks above it." + }, + "search_radius": { + "type": "integer", + "title": "Search Radius", + "default": 4, + "description": "The radius (in blocks) around the mob's current position that it will search for a valid air block to move to." + }, + "speed_mod": { + "type": "number", + "title": "Speed Mod", + "default": 1.4, + "description": "Movement speed multiplier of the mob when using this Goal." + } + } +} \ No newline at end of file diff --git a/source/behavior/entities/format/behaviors/teleport_to_owner.json b/source/behavior/entities/format/behaviors/teleport_to_owner.json new file mode 100644 index 000000000..ff87188fb --- /dev/null +++ b/source/behavior/entities/format/behaviors/teleport_to_owner.json @@ -0,0 +1,24 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.behavior.teleport_to_owner", + "type": "object", + "title": "Teleport To Owner", + "description": "Allows an entity to teleport to its owner.", + "additionalProperties": false, + "required": [], + "properties": { + "priority": { + "$ref": "types/priority.json" + }, + "cooldown": { + "title": "Cooldown", + "description": "The time in seconds that must pass for the entity to be able to try to teleport again.", + "type": "number", + "minimum": 1.0 + }, + "filters": { + "title": "Filters", + "description": "Conditions to be satisfied for the entity to teleport to its owner.", + "$ref": "../../filters/filters.json" + } + } +} diff --git a/source/behavior/entities/format/components.json b/source/behavior/entities/format/components.json index 0412bfccb..2ef213b69 100644 --- a/source/behavior/entities/format/components.json +++ b/source/behavior/entities/format/components.json @@ -4,7 +4,7 @@ "type": "object", "title": "Components", "description": "A collection of components.", - "required": [], + "required": [ ], "properties": { "minecraft:absorption": { "$ref": "./components/attribute.json" }, "minecraft:addrider": { "$ref": "./components/addrider.json" }, @@ -238,6 +238,7 @@ "minecraft:behavior.find_cover": { "$ref": "./behaviors/find_cover.json" }, "minecraft:behavior.find_mount": { "$ref": "./behaviors/find_mount.json" }, "minecraft:behavior.find_underwater_treasure": { "$ref": "./behaviors/find_underwater_treasure.json" }, + "minecraft:behavior.fire_at_target": { "$ref": "./behaviors/fire_at_target.json" }, "minecraft:behavior.flee_sun": { "$ref": "./behaviors/flee_sun.json" }, "minecraft:behavior.float_wander": { "$ref": "./behaviors/float_wander.json" }, "minecraft:behavior.float": { "$ref": "./behaviors/float.json" }, @@ -256,6 +257,7 @@ "minecraft:behavior.hurt_by_target": { "$ref": "./behaviors/hurt_by_target.json" }, "minecraft:behavior.inspect_bookshelf": { "$ref": "./behaviors/inspect_bookshelf.json" }, "minecraft:behavior.investigate_suspicious_location": { "$ref": "./behaviors/investigate_suspicious_location.json" }, + "minecraft:behavior.jump_around_target": { "$ref": "./behaviors/jump_around_target.json" }, "minecraft:behavior.jump_to_block": { "$ref": "./behaviors/jump_to_block.json" }, "minecraft:behavior.knockback_roar": { "$ref": "./behaviors/knockback_roar.json" }, "minecraft:behavior.lay_down": { "$ref": "./behaviors/lay_down.json" }, @@ -295,7 +297,6 @@ "minecraft:behavior.owner_hurt_by_target": { "$ref": "./behaviors/owner_hurt_by_target.json" }, "minecraft:behavior.owner_hurt_target": { "$ref": "./behaviors/owner_hurt_target.json" }, "minecraft:behavior.panic": { "$ref": "./behaviors/panic.json" }, - "minecraft:behavior.peek": { "$ref": "./behaviors/peek.json" }, "minecraft:behavior.pet_sleep_with_owner": { "$ref": "./behaviors/pet_sleep_with_owner.json" }, "minecraft:behavior.pickup_items": { "$ref": "./behaviors/pickup_items.json" }, "minecraft:behavior.play_dead": { "$ref": "./behaviors/play_dead.json" }, @@ -349,10 +350,13 @@ "minecraft:behavior.summon_entity": { "$ref": "./behaviors/summon_entity.json" }, "minecraft:behavior.swell": { "$ref": "./behaviors/swell.json" }, "minecraft:behavior.swim_idle": { "$ref": "./behaviors/swim_idle.json" }, + "minecraft:behavior.swim_up_for_breath": { "$ref": "./behaviors/swim_up_for_breath.json" }, "minecraft:behavior.swim_wander": { "$ref": "./behaviors/swim_wander.json" }, "minecraft:behavior.swim_with_entity": { "$ref": "./behaviors/swim_with_entity.json" }, "minecraft:behavior.swoop_attack": { "$ref": "./behaviors/swoop_attack.json" }, "minecraft:behavior.take_flower": { "$ref": "./behaviors/take_flower.json" }, + "minecraft:behavior.teleport_to_owner": { "$ref": "./behaviors/teleport_to_owner.json" }, + "minecraft:behavior.move_around_target": { "$ref": "./behaviors/move_around_target.json" }, "minecraft:behavior.target_when_pushed": { "$ref": "./behaviors/target_when_pushed.json" }, "minecraft:behavior.tempt": { "$ref": "./behaviors/tempt.json" }, "minecraft:behavior.timer_flag_1": { "$ref": "./behaviors/timer_flag.json" }, diff --git a/source/behavior/features/features/minecraft.scatter_feature.json b/source/behavior/features/features/minecraft.scatter_feature.json index 05a14af7d..f157f2b86 100644 --- a/source/behavior/features/features/minecraft.scatter_feature.json +++ b/source/behavior/features/features/minecraft.scatter_feature.json @@ -5,7 +5,7 @@ "additionalProperties": false, "required": ["description", "places_feature", "iterations"], "definitions": { - "coordinate": { + "coord_dist": { "title": "Coordinate", "oneOf": [ { @@ -73,56 +73,58 @@ "description": "If true, snaps the y-value of the scattered position to the terrain heightmap. If false or unset, y-value is unmodified.", "type": "boolean" }, - "iterations": { - "title": "Iterations", - "description": "Number of scattered positions to generate.", - "$ref": "../../../molang/number.json" - }, - "scatter_chance": { - "title": "Scatter Chance", - "oneOf": [ - { - "type": "object", - "additionalProperties": false, - "description": "Probability numerator / denominator that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.", - "properties": { - "numerator": { - "title": "Numerator", - "description": "UNDOCUMENTED.", - "type": "integer", - "minimum": 1 + "distribution": { + "title": "Distribution", + "description": "Parameters controlling the initial scatter of the feature.", + "type": "object", + "additionalProperties": false, + "required": [ "iterations" ], + "properties": { + "coordinate_eval_order": { + "title": "Coordinate Eval Order", + "description": "The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to `xzy`.", + "type": "string", + "enum": [ "xyz", "xzy", "yxz", "yzx", "zxy", "zyx" ] + }, + "iterations": { + "title": "Iterations", + "description": "Number of scattered positions to generate.", + "$ref": "../../../molang/number.json" + }, + "scatter_chance": { + "title": "Scatter Chance", + "oneOf": [ + { + "$ref": "../../../molang/number.json", + "description": "Probability (0-100] that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will." }, - "denominator": { - "title": "Denominator", - "description": "UNDOCUMENTED.", - "type": "integer", - "minimum": 1 + { + "type": "object", + "description": "Probability numerator / denominator that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will.", + "additionalProperties": false, + "properties": { + "numerator": { + "title": "Numerator", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED", + "type": "number", + "minimum": 1 + }, + "denominator": { + "title": "Denominator", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED", + "type": "number", + "minimum": 1 + } + } } - } + ] }, - { - "$ref": "../../../molang/number.json", - "description": "Probability (0-100] that this scatter will occur. Not evaluated each iteration; either no iterations will run, or all will." - } - ] - }, - "coordinate_eval_order": { - "title": "Coordinate Eval Order", - "description": "The order in which coordinates will be evaluated. Should be used when a coordinate depends on another. If omitted, defaults to `xzy`.", - "type": "string", - "enum": ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"] - }, - "x": { - "title": "X", - "$ref": "#/definitions/coordinate" - }, - "y": { - "title": "X", - "$ref": "#/definitions/coordinate" - }, - "z": { - "title": "X", - "$ref": "#/definitions/coordinate" + "x": { "title": "X", "$ref": "#/definitions/coord_dist" }, + "z": { "title": "Y", "$ref": "#/definitions/coord_dist" }, + "y": { "title": "Z", "$ref": "#/definitions/coord_dist" } + } } } } diff --git a/source/behavior/items/format/components/bundle_interaction.json b/source/behavior/items/format/components/bundle_interaction.json new file mode 100644 index 000000000..6d509b796 --- /dev/null +++ b/source/behavior/items/format/components/bundle_interaction.json @@ -0,0 +1,14 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:bundle_interaction", + "title": "Bundle Interaction", + "description": "[EXPERIMENTAL] Adds bundle-specific interactions and tooltip to the item.", + "type": "object", + "properties": { + "num_viewable_slots": { + "description": "The maximum number of slots in the bundle viewable by the plater. Can be from 1 to 64. Default is 12.", + "type": "integer", + "minimum": 1.0, + "maximum": 64.0 + } + } +} \ No newline at end of file diff --git a/source/behavior/items/format/components/damage_absorption.json b/source/behavior/items/format/components/damage_absorption.json new file mode 100644 index 000000000..b5062f6d1 --- /dev/null +++ b/source/behavior/items/format/components/damage_absorption.json @@ -0,0 +1,21 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:damage_absorption", + "title": "Damage Absorption", + "description": "It allows an item to absorb damage that would otherwise be dealt to its wearer. For this to happen, the item needs to be equipped in an armor slot. The absorbed damage reduces the item's durability, with any excess damage being ignored. Because of this, the item also needs a `minecraft:durability` component.", + "type": "object", + "properties": { + "absorbable_causes": { + "title": "Absorbable Causes", + "description": "List of damage causes that can be absorbed by the item. By default, no damage cause is absorbed.", + "type": "array", + "items": { + "type": "string", + "$ref": "../../../../general/entity/damage_source.json" + }, + "minItems": 1 + } + }, + "required": [ + "absorbable_causes" + ] +} diff --git a/source/behavior/items/format/components/durability_sensor.json b/source/behavior/items/format/components/durability_sensor.json new file mode 100644 index 000000000..c5812ec64 --- /dev/null +++ b/source/behavior/items/format/components/durability_sensor.json @@ -0,0 +1,23 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:durability_sensor", + "$id": "764203503", + "title": "Durability Sensor", + "description": "Defines both the durability threshold, and the effects emitted when that threshold is met.", + "type": "object", + "properties": { + "durability": { + "description": "The effects are emitted when the item durability value is less than or equal to this value.", + "type": "integer" + }, + "particle_type": { + "description": "Particle effect to emit when the threshold is met.", + "type": "string" + }, + "sound_event": { + "title": "Sound Event", + "description": "Sound effect to emit when the threshold is met.", + "type": "string", + "$ref": "../../../../general/sound_event.json" + } + } +} \ No newline at end of file diff --git a/source/behavior/items/format/components/dyeable.json b/source/behavior/items/format/components/dyeable.json new file mode 100644 index 000000000..40d01975a --- /dev/null +++ b/source/behavior/items/format/components/dyeable.json @@ -0,0 +1,45 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:dyeable", + "title": "Dyeable", + "description": "Enables custom items to be dyed in cauldrons.", + "type": "object", + "properties": { + "default_color": { + "title": "Default Color", + "description": "Color to use by default. If you do not want a default color you can leave the \"default_color\" off and the texture will be the same as if you did not have the component until it is dyed.", + "oneOf": [ + { + "type": "string", + "format": "colox-hex", + "default": "#FFFFFF" + }, + { + "type": "array", + "items": [ + { + "title": "Red", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 255 + }, + { + "title": "Green", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 255 + }, + { + "title": "Blue", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 255 + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/source/behavior/items/format/components/rarity.json b/source/behavior/items/format/components/rarity.json new file mode 100644 index 000000000..6c94ea11a --- /dev/null +++ b/source/behavior/items/format/components/rarity.json @@ -0,0 +1,25 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:rarity", + "title": "Rarity", + "description": "Specifies the base rarity and subsequently color of the item name when the player hovers the cursor over the item.", + "definitions": { + "rarities": { + "enum": ["common", "uncommon", "rare", "epic"] + } + }, + "oneOf": [ + { + "type": "string", + "$ref": "#/definitions/rarities" + }, + { + "type": "object", + "properties": { + "value": { + "description": "Sets the base rarity of the item. The rarity of an item automatically increases when enchanted, either to Rare when the base rarity is Common or Uncommon, or Epic when the base rarity is Rare.", + "$ref": "#/definitions/rarities" + } + } + } + ] +} \ No newline at end of file diff --git a/source/behavior/items/format/components/storage_item.json b/source/behavior/items/format/components/storage_item.json new file mode 100644 index 000000000..97f668d9e --- /dev/null +++ b/source/behavior/items/format/components/storage_item.json @@ -0,0 +1,50 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:storage_item", + "title": "Storage Item", + "description": "[EXPERIMENTAL] Storage Items can be used by other components to store other items within this item.", + "type": "object", + "properties": { + "allow_nested_storage_items": { + "title": "Allow Nested Storage Items", + "description": "Determines whether another Storage Item is allowed inside of this item. Default is true.", + "type": "boolean" + }, + "allowed_items": { + "title": "Allowed Items", + "description": "List of items that are exclusively allowed in this Storage Item. If empty all items are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "banned_items": { + "title": "Banned Items", + "description": "List of items that are not allowed in this Storage Item.", + "type": "array", + "items": { + "type": "string" + } + }, + "max_slots": { + "title": "Max Slots", + "description": "The maximum number of different item stacks. Maximum is 64. Default is 64.", + "type": "integer", + "maximum": 64.0, + "default": 64 + }, + "max_weight_limit": { + "title": "Max Weight Limit", + "description": "The maximum allowed weight of the sum of all contained items. Maximum is 64. Default is 64.", + "type": "integer", + "maximum": 64.0, + "default": 64 + }, + "weight_in_storage_item": { + "title": "Weight In Storage Item", + "description": "The weight of this item when inside another Storage Item. Default is 4. 0 means item is not allowed in another Storage Item.", + "type": "integer", + "minimum": 0.0, + "default": 4 + } + } +} \ No newline at end of file diff --git a/source/behavior/items/format/events.json b/source/behavior/items/format/events.json deleted file mode 100644 index 288d23665..000000000 --- a/source/behavior/items/format/events.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events", - "title": "Events", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "properties": { "on_consume": { "$ref": "#/definitions/event_base" } }, - "additionalProperties": { "$ref": "#/definitions/event_base" }, - "definitions": { - "event_base": { - "title": "Event", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "$ref": "#/definitions/event_functions", - "properties": { - "sequence": { - "title": "Sequence", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "title": "Sequence", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "$ref": "#/definitions/event_functions" - } - }, - "randomize": { - "title": "Randomize", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { - "title": "Randomize", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "$ref": "#/definitions/event_functions", - "required": ["weight"], - "properties": { - "weight": { "title": "Weight", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "integer", "minimum": 0 } - } - } - }, - "run_command": { - "title": "Run Command", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "command": { - "title": "Command", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "array", - "items": { "type": "string", "title": "Command", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" } - }, - "target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["other"] } - } - } - } - }, - "event_functions": { - "title": "Event", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "properties": { - "add_mob_effect": { "$ref": "./events/add_mob_effect.json" }, - "damage": { "$ref": "./events/damage.json" }, - "decrement_stack": { "$ref": "./events/decrement_stack.json" }, - "remove_mob_effect": { "$ref": "./events/remove_mob_effect.json" }, - "shoot": { "$ref": "./events/shoot.json" }, - "swing": { "$ref": "./events/swing.json" }, - "teleport": { "$ref": "./events/teleport.json" }, - "transform_item": { "$ref": "./events/transform_item.json" } - } - } - } -} diff --git a/source/behavior/items/format/events/add_mob_effect.json b/source/behavior/items/format/events/add_mob_effect.json deleted file mode 100644 index 4280a08bd..000000000 --- a/source/behavior/items/format/events/add_mob_effect.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.add_mob_effect", - "title": "Add Mob Effect", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "effect": { "type": "string", "title": "Effect", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - "target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["holder"] }, - "duration": { "type": "number", "title": "Duration", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - "amplifier": { "type": "number", "title": "Amplifier", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" } - } -} diff --git a/source/behavior/items/format/events/damage.json b/source/behavior/items/format/events/damage.json deleted file mode 100644 index 50adc0c60..000000000 --- a/source/behavior/items/format/events/damage.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.shoot", - "title": "Shoot", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "type": { "type": "string", "title": "Type", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["magic"] }, - "amount": { "type": "number", "title": "Amount", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" } - } -} diff --git a/source/behavior/items/format/events/decrement_stack.json b/source/behavior/items/format/events/decrement_stack.json deleted file mode 100644 index b294ee518..000000000 --- a/source/behavior/items/format/events/decrement_stack.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.decrement_stack", - "title": "Decrement Stack", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false -} diff --git a/source/behavior/items/format/events/remove_mob_effect.json b/source/behavior/items/format/events/remove_mob_effect.json deleted file mode 100644 index b8ef62627..000000000 --- a/source/behavior/items/format/events/remove_mob_effect.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.remove_mob_effect", - "title": "Remove Mob Effect", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "effect": { "type": "string", "title": "Effect", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - "target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["holder"] } - } -} diff --git a/source/behavior/items/format/events/shoot.json b/source/behavior/items/format/events/shoot.json deleted file mode 100644 index f93adebea..000000000 --- a/source/behavior/items/format/events/shoot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.shoot", - "title": "Shoot", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "angle_offset": { - "type": "number", - "title": "Angle Offset", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED" - }, - "launch_power": { - "type": "number", - "title": "Launch Power", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED" - }, - "projectile": { "type": "string", "title": "Projectile", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" } - } -} diff --git a/source/behavior/items/format/events/swing.json b/source/behavior/items/format/events/swing.json deleted file mode 100644 index 1cd6300dc..000000000 --- a/source/behavior/items/format/events/swing.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.swing", - "title": "Swing", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false -} diff --git a/source/behavior/items/format/events/teleport.json b/source/behavior/items/format/events/teleport.json deleted file mode 100644 index d1a15745f..000000000 --- a/source/behavior/items/format/events/teleport.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.teleport", - "title": "Teleport", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { - "target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["holder"] }, - "max_range": { - "type": "array", - "title": "Maximum Range", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "items": [ - { "type": "number", "title": "X", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - { "type": "number", "title": "Y", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - { "type": "number", "title": "Z", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" } - ] - } - } -} diff --git a/source/behavior/items/format/events/transform_item.json b/source/behavior/items/format/events/transform_item.json deleted file mode 100644 index 84740821b..000000000 --- a/source/behavior/items/format/events/transform_item.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.items.events.transform_item", - "title": "Transform Item", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "type": "object", - "additionalProperties": false, - "properties": { "transform": { "title": "Transform", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "string" } } -} diff --git a/source/behavior/items/format/minecraft.item.json b/source/behavior/items/format/minecraft.item.json index 382f57aad..70d5cddd6 100644 --- a/source/behavior/items/format/minecraft.item.json +++ b/source/behavior/items/format/minecraft.item.json @@ -1,7 +1,7 @@ { "$id": "blockception.minecraft.behavior.items", "additionalProperties": false, - "required": ["description"], + "required": [ "description" ], "type": "object", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", @@ -53,15 +53,19 @@ "type": "object", "description": "The components of this item.", "properties": { - "minecraft:allow_off_hand": {"$ref": "./components/allow_off_hand.json"}, + "minecraft:allow_off_hand": { "$ref": "./components/allow_off_hand.json" }, "minecraft:block_placer": { "$ref": "./components/block_placer.json" }, - "minecraft:can_destroy_in_creative": {"$ref": "./components/can_destroy_in_creative.json"}, + "minecraft:bundle_interaction": { "$ref": "./components/bundle_interaction.json" }, + "minecraft:can_destroy_in_creative": { "$ref": "./components/can_destroy_in_creative.json" }, "minecraft:cooldown": { "$ref": "./components/cooldown.json" }, "minecraft:custom_components": { "$ref": "./components/custom_components.json" }, - "minecraft:damage": {"$ref": "./components/damage.json"}, + "minecraft:damage": { "$ref": "./components/damage.json" }, + "minecraft:damage_absorption": { "$ref": "./components/damage_absorption.json" }, "minecraft:digger": { "$ref": "./components/digger.json" }, "minecraft:display_name": { "$ref": "./components/display_name.json" }, + "minecraft:durability_sensor": { "$ref": "./components/durability_sensor.json" }, "minecraft:durability": { "$ref": "./components/durability.json" }, + "minecraft:dyeable": { "$ref": "./components/dyeable.json" }, "minecraft:enchantable": { "$ref": "./components/enchantable.json" }, "minecraft:entity_placer": { "$ref": "./components/entity_placer.json" }, "minecraft:food": { "$ref": "./components/food.json" }, @@ -73,17 +77,18 @@ "minecraft:max_stack_size": { "$ref": "./components/max_stack_size.json" }, "minecraft:projectile": { "$ref": "./components/projectile.json" }, "minecraft:record": { "$ref": "./components/record.json" }, + "minecraft:rarity": { "$ref": "./components/rarity.json" }, "minecraft:repairable": { "$ref": "./components/repairable.json" }, "minecraft:shooter": { "$ref": "./components/shooter.json" }, "minecraft:should_despawn": { "$ref": "./components/should_despawn.json" }, "minecraft:stacked_by_data": { "$ref": "./components/stacked_by_data.json" }, + "minecraft:storage_item": { "$ref": "./components/storage_item.json" }, "minecraft:tags": { "$ref": "./components/tags.json" }, "minecraft:throwable": { "$ref": "./components/throwable.json" }, "minecraft:use_animation": { "$ref": "./components/use_animation.json" }, "minecraft:use_modifiers": { "$ref": "./components/use_modifiers.json" }, "minecraft:wearable": { "$ref": "./components/wearable.json" } } - }, - "events": { "$ref": "./events.json" } + } } } diff --git a/source/behavior/loot_tables/functions.json b/source/behavior/loot_tables/functions.json index eb6322579..ae31e596a 100644 --- a/source/behavior/loot_tables/functions.json +++ b/source/behavior/loot_tables/functions.json @@ -27,9 +27,9 @@ "set_data", "set_lore", "set_name", + "set_potion", "specific_enchants", "trader_material_type", - "minecraft:enchant_book_for_trading", "minecraft:enchant_random_gear", "minecraft:enchant_randomly", @@ -50,6 +50,7 @@ "minecraft:set_data", "minecraft:set_lore", "minecraft:set_name", + "minecraft:set_potion", "minecraft:specific_enchants", "minecraft:trader_material_type" ] @@ -83,6 +84,7 @@ { "if": { "properties": { "function": { "type": "string", "pattern": "^(minecraft:)*random_dye$" } } }, "then": { "$ref": "./functions/random_dye.json" } }, { "if": { "properties": { "function": { "type": "string", "pattern": "^(minecraft:)*set_lore$" } } }, "then": { "$ref": "./functions/set_lore.json" } }, { "if": { "properties": { "function": { "type": "string", "pattern": "^(minecraft:)*set_name$" } } }, "then": { "$ref": "./functions/set_name.json" } }, + { "if": { "properties": { "function": { "type": "string", "pattern": "^(minecraft:)*set_potion$" } } }, "then": { "$ref": "./functions/set_potion.json" } }, { "if": { "properties": { "function": { "type": "string", "pattern": "^(minecraft:)*specific_enchants$" } } }, "then": { "$ref": "./functions/specific_enchants.json" } } ] } diff --git a/source/behavior/loot_tables/functions/set_potion.json b/source/behavior/loot_tables/functions/set_potion.json new file mode 100644 index 000000000..8b340f4aa --- /dev/null +++ b/source/behavior/loot_tables/functions/set_potion.json @@ -0,0 +1,64 @@ +{ + "$id": "blockception.minecraft.behavior.loot_tables.set_potion", + "additionalProperties": false, + "description": "The function set_potion.", + "title": "Set Lore", + "type": "object", + "properties": { + "function": { "type": "string", "const": "set_lore", "description": "This function sets the potion type of compatible items with a potion id..", "title": "Function" }, + "id": { + "title": "Id", + "type": "string", + "description": "ID of the potion to set.", + "enum": [ + "water", + "mundane", + "long_mundane", + "thick", + "awkward", + "nightvision", + "long_nightvision", + "invisibility", + "long_invisibility", + "leaping", + "long_leaping", + "strong_leaping", + "fire_resistance", + "long_fire_resistance", + "swiftness", + "long_swiftness", + "strong_swiftness", + "slowness", + "long_slowness", + "strong_slowness", + "water_breathing", + "long_water_breathing", + "healing", + "strong_healing", + "harming", + "strong_harming", + "poison", + "long_poison", + "strong_poison", + "regeneration", + "long_regeneration", + "strong_regeneration", + "strength", + "long_strength", + "strong_strength", + "weakness", + "long_weakness", + "wither", + "turtle_master", + "long_turtle_master", + "strong_turtle_master", + "slow_falling", + "long_slow_falling", + "wind_charged", + "weaving", + "oozing", + "infested" + ] + } + } +} diff --git a/source/behavior/trading/trading.json b/source/behavior/trading/trading.json index 4aefe9b5e..670bd3818 100644 --- a/source/behavior/trading/trading.json +++ b/source/behavior/trading/trading.json @@ -10,7 +10,7 @@ { "tiers": [ { - "trades": [{ "wants": [{ "item": "minecraft:coal:0", "quantity": { "min": 16, "max": 24 } }], "gives": [{ "item": "minecraft:emerald" }] }] + "trades": [ { "wants": [ { "item": "minecraft:coal:0", "quantity": { "min": 16, "max": 24 } } ], "gives": [ { "item": "minecraft:emerald" } ] } ] } ] } @@ -42,7 +42,7 @@ { "type": "object", "additionalProperties": false, - "required": ["min", "max"], + "required": [ "min", "max" ], "properties": { "min": { "type": "integer", "minimum": 1, "title": "Minimum" }, "max": { "type": "integer", "minimum": 1, "title": "Maximum" } @@ -57,7 +57,7 @@ "Functions": { "title": "Functions", "type": "array", - "items": { "type": "object", "required": ["function"], "$ref": "../loot_tables/functions.json" } + "items": { "type": "object", "required": [ "function" ], "$ref": "../loot_tables/functions.json" } }, "TradeArray": { "type": "array", @@ -66,7 +66,7 @@ "additionalProperties": false, "type": "object", "title": "Trade", - "required": ["wants", "gives"], + "required": [ "wants", "gives" ], "properties": { "gives": { "type": "array", @@ -87,7 +87,7 @@ { "type": "object", "additionalProperties": false, - "required": ["min", "max"], + "required": [ "min", "max" ], "properties": { "min": { "type": "integer", "minimum": 1, "title": "Minimum" }, "max": { "type": "integer", "minimum": 1, "title": "Maximum" } @@ -127,7 +127,7 @@ { "type": "object", "additionalProperties": false, - "required": ["min", "max"], + "required": [ "min", "max" ], "properties": { "min": { "type": "integer", "minimum": 1, "title": "Minimum" }, "max": { "type": "integer", "minimum": 1, "title": "Maximum" } @@ -167,6 +167,7 @@ "additionalProperties": false, "type": "object", "title": "Tier", + "required": [ "total_exp_required", "groups" ], "properties": { "trades": { "$ref": "#/definitions/TradeArray" }, "total_exp_required": { "title": "Total Experience Required", "type": "integer" }, diff --git a/source/behavior/volumes/1.17.0/volumes.json b/source/behavior/volumes/1.17.0/volumes.json deleted file mode 100644 index 7cf488c1b..000000000 --- a/source/behavior/volumes/1.17.0/volumes.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.volumes.1.17.0", - "type": "object", - "title": "Spawn Rules 1.17.0", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "additionalProperties": false, - "required": ["format_version", "minecraft:volume"], - "properties": { - "format_version": { - "const": "1.17.0", - "description": "Specifies the version of the game this entity was made in. Minimum supported version is 1.17.0. Current supported version is 1.17.0.", - "title": "Format Version" - }, - "minecraft:volume": { - "type": "object", - "title": "Spawn Rules", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "additionalProperties": false, - "properties": { - "description": { - "type": "object", - "title": "Description", - "description": "The description contains a single `identifier` string.", - "additionalProperties": false, - "properties": { - "identifier": { - "title": "Identifier", - "description": "The unique identifier for this volume. It must be of the form `namespace:name', where namespace cannot be `minecraft`.", - "$ref": "../../../general/volume/identifier.json" - } - } - }, - "components": { - "type": "object", - "title": "Components", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED", - "additionalProperties": false, - "properties": { - "minecraft:bounds": { - "title": "Bounds", - "description": "Component that defines a minimum and maximum block position for a bounding box and which world dimension the bounding box is in. Every volume must have a bounds component.", - "type": "object", - "additionalProperties": false, - "properties": { - "dimension": { - "type": "string", - "description": "The name of the dimension the bounding box will exist in: one of `overworld', `nether` or `the end`.", - "title": "Dimension", - "enum": ["overworld", "nether", "the end"] - }, - "max": { - "type": "array", - "description": "The maximum block position of the bounding box.", - "title": "Maximum", - "items": [ - { "title": "X", "type": "number" }, - { "title": "Y", "type": "number" }, - { "title": "Z", "type": "number" } - ] - }, - "min": { - "type": "array", - "description": "The minimum block position of the bounding box.", - "title": "Minimum", - "items": [ - { "title": "X", "type": "number" }, - { "title": "Y", "type": "number" }, - { "title": "Z", "type": "number" } - ] - } - } - }, - "minecraft:fog": { - "title": "Fog", - "description": "Displays the given fog whenever a player enters the volume. Each volume can only have one fog attached.", - "type": "object", - "additionalProperties": false, - "properties": { - "fog_identifier": { - "type": "string", - "default": "", - "description": "The identifier of a fog definition. Note that you will not receive any feedback if the definition does not exist.", - "title": "Fog Identifier" - }, - "priority": { - "type": "integer", - "default": 2147483647, - "description": "The priority for this fog definition setting. Smaller numbers have higher priority. Fogs with equal priority will be combined together.", - "title": "Priority" - } - } - }, - "minecraft:on_actor_enter": { - "title": "On Actor Enter", - "description": "Component that defines what happens when an actor enters the volume. Can contain multiple json objects.", - "type": "object", - "additionalProperties": false, - "required": ["on_enter"], - "properties": { - "on_enter": { - "title": "On Enter", - "description": "Required array that contains all the triggers.", - "type": "array", - "items": { - "title": "On Enter Trigger", - "description": "Trigger.", - "type": "object", - "additionalProperties": false, - "properties": { - "condition": { - "title": "Condition", - "description": "Molang expression to test against the actor. The given event will be triggered if the expression evaluates to true.", - "type": "string", - "$ref": "../../../molang/string.json" - }, - "event": { - "title": "Event", - "description": "Name of the event to run.", - "type": "string" - }, - "target": { - "title": "Target", - "description": "One of `self` or `other`. Self means the event is attached to the volume. Other means the event is attached to the actor.", - "type": "string", - "enum": ["self", "other"] - } - } - } - } - } - }, - "minecraft:on_actor_leave": { - "title": "On Actor Leave", - "description": "Component that defines what happens when an actor leaves the volume.", - "type": "object", - "additionalProperties": false, - "required": ["on_enter"], - "properties": { - "on_enter": { - "title": "On Enter", - "description": "Required array that contains all the triggers.", - "type": "array", - "items": { - "title": "On Enter Trigger", - "description": "Trigger.", - "type": "object", - "additionalProperties": false, - "properties": { - "condition": { - "title": "Condition", - "description": "Molang expression to test against the actor. The given event will be triggered if the expression evaluates to true.", - "type": "string", - "$ref": "../../../molang/string.json" - }, - "event": { - "title": "Event", - "description": "Name of the event to run.", - "type": "string" - }, - "target": { - "title": "Target", - "description": "One of `self` or `other`. Self means the event is attached to the volume. Other means the event is attached to the actor.", - "type": "string", - "enum": ["self", "other"] - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/source/behavior/volumes/volumes.json b/source/behavior/volumes/volumes.json deleted file mode 100644 index 3607c5909..000000000 --- a/source/behavior/volumes/volumes.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "blockception.minecraft.behavior.volumes", - "examples": [ - { - "format_version": "1.20.80", - "minecraft:volume": { - "description": { - "identifier": "example:foo" - }, - "components": {} - } - } - ], - "allOf": [ - { "if": { "properties": { "format_version": { "type": "string", "const": "1.17.0" } } }, "then": { "$ref": "./1.17.0/volumes.json" } }, - { "properties": { "format_version": { "$ref": "../../general/format_version.json" } } } - ] -} diff --git a/source/compress_specification.json b/source/compress_specification.json index 3f239c16b..085c27054 100644 --- a/source/compress_specification.json +++ b/source/compress_specification.json @@ -18,7 +18,6 @@ { "Source": "./behavior/recipes/recipes.json", "Destination": "../behavior/recipes/recipes.json" }, { "Source": "./behavior/spawn_rules/spawn_rules.json", "Destination": "../behavior/spawn_rules/spawn_rules.json" }, { "Source": "./behavior/trading/trading.json", "Destination": "../behavior/trading/trading.json" }, - { "Source": "./behavior/volumes/volumes.json", "Destination": "../behavior/volumes/volumes.json" }, { "Source": "./general/manifest.json", "Destination": "../general/manifest.json" }, { "Source": "./general/world_x_packs.json", "Destination": "../general/world_x_packs.json" }, diff --git a/source/resource/models/entity/1.21.0/model_entity.json b/source/resource/models/entity/1.21.0/model_entity.json new file mode 100644 index 000000000..7e7a023de --- /dev/null +++ b/source/resource/models/entity/1.21.0/model_entity.json @@ -0,0 +1,713 @@ +{ + "$id": "blockception.minecraft.resource.model.1.21.0", + "additionalProperties": false, + "type": "object", + "title": "Geometry 1.21.0", + "description": "The minecraft resourcepack model schema for 1.21.0", + "required": [ + "format_version", + "minecraft:geometry" + ], + "definitions": { + "uv": { + "type": "array", + "items": [ + { + "type": "number", + "title": "X", + "description": "The x component of the uv." + }, + { + "type": "number", + "title": "Y", + "description": "The y component of the uv." + } + ] + }, + "direction_uv": { + "additionalProperties": false, + "type": "object", + "properties": { + "uv": { + "title": "Uv", + "description": "Specifies the uv origin for the face. For this face, it is the upper-left corner, when looking at the face with y being up.", + "$ref": "#/definitions/uv" + }, + "uv_size": { + "title": "Uv Size", + "description": "The face maps this many texels from the uv origin. If not specified, the box dimensions are used instead.", + "$ref": "#/definitions/uv" + }, + "material_instance": { + "type": "string", + "title": "Material Instance", + "description": "Specifies the UV's for the face that stretches." + } + } + }, + "display_transform": { + "rotation": { + "title": "Rotation", + "description": "Amount in degrees the block should be rotated on each axis. \"rotation\" is specified as [x, y, z] using floating point values and must be axis aligned, otherwise the value will be rounded to the nearest axis-aligned value.", + "type": "array", + "items": [ + { + "title": "X", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "type": "number", + "default": 0 + } + ] + }, + "scale": { + "title": "Scale", + "description": "Amount the block should be scaled along each axis. \"scale\" is specified as [x, y, z] using floating point values.", + "type": "array", + "items": [ + { + "title": "X", + "type": "number", + "default": 1 + }, + { + "title": "Y", + "type": "number", + "default": 1 + }, + { + "title": "Z", + "type": "number", + "default": 1 + } + ] + }, + "translation": { + "title": "Translation", + "description": "Amount the block should be translated along each axis. \"translation\" is specified as [x, y, z] using floating point values.", + "type": "array", + "items": [ + { + "title": "X", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "type": "number", + "default": 0 + } + ] + }, + "scale_pivot": { + "title": "Scale Pivot", + "description": "Offset to the pivot point around which to apply the scale. \"scale_pivot\" is specified as [x, y, z] using floating point values.", + "type": "array", + "default": [ 0, 0, 0 ], + "items": [ + { + "title": "X", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "type": "number", + "default": 0 + } + ] + }, + "rotation_pivot": { + "title": "Rotation Pivot", + "description": "Offset to the pivot point around which to apply the rotation. \"rotation_pivot\" is specified as [x, y, z] using floating point values.", + "type": "array", + "default": [ 0, 0, 0 ], + "items": [ + { + "title": "X", + "type": "number", + "default": 0 + }, + { + "title": "Y", + "type": "number", + "default": 0 + }, + { + "title": "Z", + "type": "number", + "default": 0 + } + ] + } + } + }, + "properties": { + "debug": { + "title": "Debug", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED", + "type": "boolean", + "default": false + }, + "format_version": { + "$ref": "../../../../general/format_version.json" + }, + "minecraft:geometry": { + "type": "array", + "title": "Geometry", + "description": "The collection of geometries.", + "minItems": 1, + "items": { + "additionalProperties": false, + "description": "Model specification.", + "title": "Model", + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "object", + "additionalProperties": false, + "description": "The descriptions of the geometry.", + "title": "Description", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "string", + "description": "Entity definition and Client Block definition files refer to this geometry via this identifier.", + "pattern": "^geometry.[\\:a-zA-Z0-9_\\-\\.]+$", + "title": "Identifier" + }, + "texture_width": { + "type": "number", + "description": "Assumed width in texels of the texture that will be bound to this geometry.", + "title": "Texture Width" + }, + "texture_height": { + "type": "number", + "description": "Assumed height in texels of the texture that will be bound to this geometry.", + "title": "Texture Height" + }, + "visible_bounds_offset": { + "title": "Visible Bounds Offset", + "description": "Offset of the visibility bounding box from the entity location point (in model space units).", + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number" + } + }, + "visible_bounds_width": { + "type": "number", + "title": "Visible Bounds Width", + "description": "Width of the visibility bounding box (in model space units)." + }, + "visible_bounds_height": { + "type": "number", + "title": "Visible Bounds Height", + "description": "Height of the visible bounding box (in model space units)." + } + } + }, + "bones": { + "title": "Bones", + "type": "array", + "description": "Bones define the `skeleton` of the mob: the parts that can be animated, and to which geometry and other bones are attached.", + "items": { + "additionalProperties": false, + "type": "object", + "description": "A bones specification.", + "required": [ + "name" + ], + "properties": { + "binding": { + "title": "Binding", + "description": "useful for items. A molang expression specifying the bone name of the parent skeletal hierarchy that this bone should use as the root transform. Without this field it will look for a bone in the parent entity with the same name as this bone. If both are missing, it will assume a local skeletal hierarchy (via the `parent` field). If that is also missing, it will attach to the owning entity's root transform.", + "$ref": "../../../../molang/string.json" + }, + "cubes": { + "title": "Cubes", + "description": "This is the list of cubes associated with this bone.", + "type": "array", + "items": { + "additionalProperties": false, + "type": "object", + "description": "A single cube.", + "properties": { + "inflate": { + "type": "number", + "description": "Grow this box by this additive amount in all directions (in model space units), this field overrides the bone's inflate field for this cube only." + }, + "mirror": { + "type": "boolean", + "description": "Mirrors this cube about the unrotated x axis (effectively flipping the east / west faces), overriding the bone's `mirror` setting for this cube." + }, + "origin": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "This point declares the unrotated lower corner of cube (smallest x/y/z value in model space units)." + } + }, + "pivot": { + "type": "array", + "description": "If this field is specified, rotation of this cube occurs around this point, otherwise its rotation is around the center of the box. Note that in 1.12 this is flipped upside-down, but is fixed in 1.14.", + "title": "Pivot", + "items": [ + { + "type": "number", + "title": "X", + "description": "If this field is specified, rotation of this cube occurs around this point, otherwise its rotation is around the center of the box. Note that in 1.12 this is flipped upside-down, but is fixed in 1.14." + }, + { + "type": "number", + "title": "Y", + "description": "If this field is specified, rotation of this cube occurs around this point, otherwise its rotation is around the center of the box. Note that in 1.12 this is flipped upside-down, but is fixed in 1.14." + }, + { + "type": "number", + "title": "Z", + "description": "If this field is specified, rotation of this cube occurs around this point, otherwise its rotation is around the center of the box. Note that in 1.12 this is flipped upside-down, but is fixed in 1.14." + } + ] + }, + "reset": { + "title": "Reset", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED", + "type": "boolean" + }, + "rotation": { + "title": "Rotation", + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "The cube is rotated by this amount (in degrees, x-then-y-then-z order) around the pivot." + } + }, + "size": { + "title": "Size", + "type": "array", + "description": "The cube extends this amount relative to its origin (in model space units).", + "items": [ + { + "type": "number", + "title": "X", + "description": "The cube extends this amount relative to its origin (in model space units)." + }, + { + "type": "number", + "title": "Y", + "description": "The cube extends this amount relative to its origin (in model space units)." + }, + { + "type": "number", + "title": "Z", + "description": "The cube extends this amount relative to its origin (in model space units)." + } + ] + }, + "uv": { + "title": "Uv", + "description": "This is an alternate per-face uv mapping which specifies each face of the cube. Omitting a face will cause that face to not get drawn.", + "oneOf": [ + { + "additionalProperties": false, + "type": "object", + "properties": { + "north": { + "title": "North", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the x and y axes, and faces the -z axis." + }, + "south": { + "title": "South", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the x and y axes, and faces the z axis." + }, + "east": { + "title": "East", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the z and y axes, and faces the x axis." + }, + "west": { + "title": "West", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the z and y axes, and faces the -x axis." + }, + "up": { + "title": "Up", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the x and z axes, and faces the y axis." + }, + "down": { + "title": "Down", + "$ref": "#/definitions/direction_uv", + "description": "Specifies the UV's for the face that stretches along the x and z axes, and faces the -y axis." + } + } + }, + { + "type": "array", + "items": [ + { + "type": "number", + "title": "X", + "description": "The x component of the uv." + }, + { + "type": "number", + "title": "Y", + "description": "The y component of the uv." + } + ] + } + ] + } + } + } + }, + "debug": { + "type": "boolean" + }, + "inflate": { + "type": "number", + "description": "Grow this box by this additive amount in all directions (in model space units)." + }, + "locators": { + "description": "This is a list of locators associated with this bone. A locator is a point in model space that tracks a particular bone as the bone animates (by maintaining it's relationship to the bone through the animation).", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "required": [ + "offset", + "rotation" + ], + "properties": { + "offset": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "description": "Position of the locator in model space.", + "items": { + "type": "number", + "description": "Position of the locator in model space." + } + }, + "rotation": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "description": "Rotation of the locator in model space.", + "items": { + "type": "number", + "description": "Rotation of the locator in model space." + } + }, + "ignore_inherited_scale": { + "type": "boolean", + "description": "Discard scale inherited from parent bone." + } + } + }, + { + "type": "array", + "minItems": 3, + "maxItems": 3, + "description": "This is a list of locators associated with this bone. A locator is a point in model space that tracks a particular bone as the bone animates (by maintaining it's relationship to the bone through the animation).", + "items": { + "type": "number", + "description": "Position of the locator in model space." + } + } + ] + } + }, + "mirror": { + "type": "boolean", + "title": "Mirror", + "description": "Mirrors the UV's of the unrotated cubes along the x axis, also causes the east/west faces to get flipped." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Animation files refer to this bone via this identifier." + }, + "parent": { + "type": "string", + "title": "Parent", + "description": "Bone that this bone is relative to. If the parent bone moves, this bone will move along with it." + }, + "pivot": { + "type": "array", + "title": "Pivot", + "description": "The bone pivots around this point (in model space units).", + "items": [ + { + "type": "number", + "title": "X" + }, + { + "type": "number", + "title": "Y" + }, + { + "type": "number", + "title": "Z" + } + ] + }, + "poly_mesh": { + "additionalProperties": false, + "type": "object", + "description": "***EXPERIMENTAL*** A triangle or quad mesh object. Can be used in conjunction with cubes and texture geometry.", + "required": [ + "polys" + ], + "properties": { + "normalized_uvs": { + "type": "boolean", + "description": "If true, UVs are assumed to be [0-1]. If false, UVs are assumed to be [0-texture_width] and [0-texture_height] respectively." + }, + "normals": { + "type": "array", + "description": "Vertex normals. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and UVs sections.", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "description": "Vertex normals. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and UVs sections.", + "items": { + "type": "number", + "description": "Vertex normals. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and UVs sections." + } + } + }, + "polys": { + "oneOf": [ + { + "type": "string", + "description": "If not specifying vertex indices, arrays of data must be a list of tris or quads, set by making this property either `tri_list` or `quad_list`.", + "enum": [ + "tri_list", + "quad_list" + ] + }, + { + "type": "array", + "description": "Poly element indices, as an array of polygons, each an array of either three or four vertices, each an array of indices into positions, normals, and UVs (in that order).", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 4, + "description": "Poly element indices, as an array of polygons, each an array of either three or four vertices, each an array of indices into positions, normals, and UVs (in that order).", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "number", + "description": "The index of the position." + }, + { + "type": "number", + "description": "The index of the normal vertex." + }, + { + "type": "number", + "description": "The index of the uv vertex." + } + ] + } + } + } + ] + }, + "positions": { + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "Vertex positions for the mesh. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the normals and UVs sections." + } + } + }, + "uvs": { + "type": "array", + "description": "Vertex UVs. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and normals sections.", + "items": { + "type": "array", + "description": "Vertex UVs. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and normals sections.", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number", + "description": "Vertex UVs. Can be either indexed via the `polys` section, or be a quad-list if mapped 1-to-1 to the positions and normals sections." + } + } + } + } + }, + "render_group_id": { + "type": "integer", + "minimum": 0 + }, + "rotation": { + "type": "array", + "title": "Rotation", + "description": "This is the initial rotation of the bone around the pivot, pre-animation (in degrees, x-then-y-then-z order).", + "items": [ + { + "type": "number", + "title": "X", + "description": "in degrees." + }, + { + "type": "number", + "title": "Y", + "description": "in degrees." + }, + { + "type": "number", + "title": "Z", + "description": "in degrees." + } + ] + }, + "texture_meshes": { + "type": "array", + "title": "Texture Meshes", + "description": "***EXPERIMENTAL*** Adds a mesh to the bone's geometry by converting texels in a texture into boxes.", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "texture" + ], + "properties": { + "local_pivot": { + "type": "array", + "description": "The pivot point on the texture (in *texture space* not entity or bone space) of the texture geometry.", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "The pivot point on the texture (in *texture space* not entity or bone space) of the texture geometry." + } + }, + "position": { + "type": "array", + "description": "The position of the pivot point after rotation (in *entity space* not texture or bone space) of the texture geometry.", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "The position of the pivot point after rotation (in *entity space* not texture or bone space) of the texture geometry." + } + }, + "rotation": { + "type": "array", + "description": "The rotation (in degrees) of the texture geometry relative to the offset.", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "The rotation (in degrees) of the texture geometry relative to the offset." + } + }, + "scale": { + "type": "array", + "description": "The scale (in degrees) of the texture geometry relative to the offset.", + "minItems": 3, + "maxItems": 3, + "items": { + "type": "number", + "description": "The scale (in degrees) of the texture geometry relative to the offset." + } + }, + "texture": { + "type": "string", + "description": "The friendly-named texture to use." + } + } + } + } + } + } + }, + "cape": { + "title": "Cape", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED", + "type": "string" + }, + "item_display_transforms": { + "title": "Item Display Transforms", + "type": "object", + "additionalProperties": true, + "properties": { + "gui": { + "$ref": "#/definitions/display_transform" + }, + "firstperson_righthand": { + "$ref": "#/definitions/display_transform" + }, + "firstperson_lefthand": { + "$ref": "#/definitions/display_transform" + }, + "thirdperson_righthand": { + "$ref": "#/definitions/display_transform" + }, + "thirdperson_lefthand": { + "$ref": "#/definitions/display_transform" + }, + "ground": { + "$ref": "#/definitions/display_transform" + }, + "fixed": { + "$ref": "#/definitions/display_transform" + }, + "head": { + "$ref": "#/definitions/display_transform" + } + } + } + } + } + } + } +} diff --git a/source/resource/models/entity/model_entity.json b/source/resource/models/entity/model_entity.json index a7638473e..0c73fbff0 100644 --- a/source/resource/models/entity/model_entity.json +++ b/source/resource/models/entity/model_entity.json @@ -18,7 +18,11 @@ ] } ], - "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, - "then": { "$ref": "./1.8.0/model_entity.json" }, - "else": { "$ref": "./1.16.0/model_entity.json" } + "if": { "properties": { "format_version": { "type": "string", "const": "1.21.0" } } }, + "then": { "$ref": "./1.21.0/model_entity.json" }, + "else": { + "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, + "then": { "$ref": "./1.8.0/model_entity.json" }, + "else": { "$ref": "./1.16.0/model_entity.json" } + } }