diff --git a/source/behavior/cameras/presets/camera.json b/source/behavior/cameras/presets/camera.json new file mode 100644 index 00000000..54b9710b --- /dev/null +++ b/source/behavior/cameras/presets/camera.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behavior.cameras.preset", + "defaultSnippets": [ + { + "format_version": "${1:1.20.41}", + "minecraft:npc_dialogue": { + "identifier": "$2", + "inherit_from": "$3", + "pos_x": 30, + "pos_y": 90, + "pos_z": -20, + "rot_x": 10, + "rot_y": 40 + } + } + ], + "examples": [ + { + "format_version": "1.20.41", + "minecraft:npc_dialogue": { + "identifier": "example:custom", + "inherit_from": "minecraft:free", + "pos_x": 30, + "pos_y": 90, + "pos_z": -20, + "rot_x": 10, + "rot_y": 40 + } + } + ], + "type": "object", + "title": "Camera Preset", + "description": "A camera preset is a set of values that define a camera's position and rotation. This can be used to quickly set a camera to a specific position and rotation.", + "additionalProperties": false, + "required": ["format_version", "minecraft:camera_preset"], + "properties": { + "format_version": { "$ref": "../../../general/format_version.json" }, + "minecraft:camera_preset": { + "identifier": { + "type": "string", + "description": "The identifier of the camera preset. This is used to reference the camera preset in other components.", + "$ref": "../../../general/cameras/identifier.json" + }, + "inherit_from": { + "type": "string", + "description": "The identifier of the camera preset to inherit from. This will copy the values from the inherited camera preset and then apply the values from this camera preset.", + "$ref": "../../../general/cameras/identifier.json" + }, + "player_effects": { + "type": "boolean", + "description": "If true, the camera will apply player effects such as nausea and blindness.", + "default": false + }, + "listener": { + "type": "string", + "description": "Specifies what / who acts as the ears for the camera.", + "examples": ["player"] + }, + "pos_x": { + "type": "number", + "description": "The x position of the camera.", + "default": 0 + }, + "pos_y": { + "type": "number", + "description": "The y position of the camera.", + "default": 0 + }, + "pos_z": { + "type": "number", + "description": "The z position of the camera.", + "default": 0 + }, + "rot_x": { + "type": "number", + "description": "The pitch of the camera. positive values look down, negative values look up.", + "default": 0, + "examples": [0, 22.5, 45, 67.5, 90, -22.5, -45, -67.5, -90] + }, + "rot_y": { + "type": "number", + "description": "The yaw of the camera. This is the direction the camera is facing.", + "default": 0, + "examples": [0, 90, 180, 270] + } + } + } +} diff --git a/source/compress_specification.json b/source/compress_specification.json index b8bbd6d8..3e50da95 100644 --- a/source/compress_specification.json +++ b/source/compress_specification.json @@ -1,51 +1,55 @@ { "$schema": "https://raw.githubusercontent.com/DaanV2/JsonSchemaValidationCompressor.Net/master/Schema/Compression%20Schema.json", "Files": [ - { "Source": "./skinpacks/skins.json", "Destination": "../skinpacks/skins.json" }, - { "Source": "./language/language_names.json", "Destination": "../language/language_names.json" }, - { "Source": "./language/languages.json", "Destination": "../language/languages.json" }, + { "Source": "./behavior/animation_controllers/animation_controller.json", "Destination": "../behavior/animation_controllers/animation_controller.json" }, + { "Source": "./behavior/animations/animations.json", "Destination": "../behavior/animations/animations.json" }, + { "Source": "./behavior/biomes/biomes.json", "Destination": "../behavior/biomes/biomes.json" }, + { "Source": "./behavior/blocks/blocks.json", "Destination": "../behavior/blocks/blocks.json" }, + { "Source": "./behavior/cameras/presets/cameras.json", "Destination": "../behavior/cameras/presets/cameras.json" }, + { "Source": "./behavior/dialogue/dialogue.json", "Destination": "../behavior/dialogue/dialogue.json" }, + { "Source": "./behavior/entities/entities.json", "Destination": "../behavior/entities/entities.json" }, + { "Source": "./behavior/feature_rules/feature_rules.json", "Destination": "../behavior/feature_rules/feature_rules.json" }, + { "Source": "./behavior/features/features.json", "Destination": "../behavior/features/features.json" }, + { "Source": "./behavior/functions/tick.json", "Destination": "../behavior/functions/tick.json" }, + { "Source": "./behavior/items/items.json", "Destination": "../behavior/items/items.json" }, + { "Source": "./behavior/loot_tables/loot_tables.json", "Destination": "../behavior/loot_tables/loot_tables.json" }, + { "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" }, + + { "Source": "./language/language_names.json", "Destination": "../language/language_names.json" }, + { "Source": "./language/languages.json", "Destination": "../language/languages.json" }, + + { "Source": "./resource//block_culling/block_culling.json", "Destination": "../resource/block_culling/block_culling.json" }, { "Source": "./resource/animation_controllers/animation_controller.json", "Destination": "../resource/animation_controllers/animation_controller.json" }, { "Source": "./resource/animations/actor_animation.json", "Destination": "../resource/animations/actor_animation.json" }, { "Source": "./resource/attachables/attachables.json", "Destination": "../resource/attachables/attachables.json" }, { "Source": "./resource/biomes_client.json", "Destination": "../resource/biomes_client.json" }, { "Source": "./resource/blocks.json", "Destination": "../resource/blocks.json" }, - { "Source": "./resource//block_culling/block_culling.json", "Destination": "../resource/block_culling/block_culling.json" }, { "Source": "./resource/entity/entity.json", "Destination": "../resource/entity/entity.json" }, { "Source": "./resource/fog/fog.json", "Destination": "../resource/fog/fog.json" }, - { "Source": "./resource/textures/flipbook_textures.json", "Destination": "../resource/textures/flipbook_textures.json" }, - { "Source": "./resource/textures/item_texture.json", "Destination": "../resource/textures/item_texture.json" }, - { "Source": "./resource/textures/textures_list.json", "Destination": "../resource/textures/textures_list.json" }, - { "Source": "./resource/textures/texture_set.json", "Destination": "../resource/textures/texture_set.json" }, { "Source": "./resource/items/items.json", "Destination": "../resource/items/items.json" }, - { "Source": "./resource/models/entity/model_entity.json", "Destination": "../resource/models/entity/model_entity.json" }, { "Source": "./resource/materials/materials.json", "Destination": "../resource/materials/materials.json" }, - { "Source": "./resource/sounds/music_definitions.json", "Destination": "../resource/sounds/music_definitions.json" }, + { "Source": "./resource/models/entity/model_entity.json", "Destination": "../resource/models/entity/model_entity.json" }, { "Source": "./resource/particles/particles.json", "Destination": "../resource/particles/particles.json" }, { "Source": "./resource/render_controllers/render_controllers.json", "Destination": "../resource/render_controllers/render_controllers.json" }, - { "Source": "./resource/sounds/sound_definitions.json", "Destination": "../resource/sounds/sound_definitions.json" }, { "Source": "./resource/sounds.json", "Destination": "../resource/sounds.json" }, + { "Source": "./resource/sounds/music_definitions.json", "Destination": "../resource/sounds/music_definitions.json" }, + { "Source": "./resource/sounds/sound_definitions.json", "Destination": "../resource/sounds/sound_definitions.json" }, + { "Source": "./resource/textures/flipbook_textures.json", "Destination": "../resource/textures/flipbook_textures.json" }, + { "Source": "./resource/textures/item_texture.json", "Destination": "../resource/textures/item_texture.json" }, { "Source": "./resource/textures/terrain_texture.json", "Destination": "../resource/textures/terrain_texture.json" }, + { "Source": "./resource/textures/texture_set.json", "Destination": "../resource/textures/texture_set.json" }, + { "Source": "./resource/textures/textures_list.json", "Destination": "../resource/textures/textures_list.json" }, { "Source": "./resource/textures/ui_texture_definition.json", "Destination": "../resource/textures/ui_texture_definition.json" }, - { "Source": "./resource/ui/ui.json", "Destination": "../resource/ui/ui.json" }, - { "Source": "./resource/ui/_ui_defs.json", "Destination": "../resource/ui/_ui_defs.json" }, { "Source": "./resource/ui/_global_variables.json", "Destination": "../resource/ui/_global_variables.json" }, + { "Source": "./resource/ui/_ui_defs.json", "Destination": "../resource/ui/_ui_defs.json" }, { "Source": "./resource/ui/ui.json", "Destination": "../resource/ui/ui.json" }, - { "Source": "./behavior/animation_controllers/animation_controller.json", "Destination": "../behavior/animation_controllers/animation_controller.json" }, - { "Source": "./behavior/animations/animations.json", "Destination": "../behavior/animations/animations.json" }, - { "Source": "./behavior/biomes/biomes.json", "Destination": "../behavior/biomes/biomes.json" }, - { "Source": "./behavior/dialogue/dialogue.json", "Destination": "../behavior/dialogue/dialogue.json" }, - { "Source": "./behavior/loot_tables/loot_tables.json", "Destination": "../behavior/loot_tables/loot_tables.json" }, - { "Source": "./behavior/blocks/blocks.json", "Destination": "../behavior/blocks/blocks.json" }, - { "Source": "./behavior/entities/entities.json", "Destination": "../behavior/entities/entities.json" }, - { "Source": "./behavior/features/features.json", "Destination": "../behavior/features/features.json" }, - { "Source": "./behavior/feature_rules/feature_rules.json", "Destination": "../behavior/feature_rules/feature_rules.json" }, - { "Source": "./behavior/functions/tick.json", "Destination": "../behavior/functions/tick.json" }, - { "Source": "./behavior/items/items.json", "Destination": "../behavior/items/items.json" }, - { "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": "./resource/ui/ui.json", "Destination": "../resource/ui/ui.json" }, + { "Source": "./skinpacks/skins.json", "Destination": "../skinpacks/skins.json" } ] } diff --git a/source/general/cameras/identifier.json b/source/general/cameras/identifier.json new file mode 100644 index 00000000..e7121f79 --- /dev/null +++ b/source/general/cameras/identifier.json @@ -0,0 +1,9 @@ +{ + "$id": "blockception.minecraft.camera.identifier", + "description": "A minecraft camera identifier.", + "examples": ["namespace:camera"], + "pattern": "^[0-9a-zA-Z:_\\.\\-]+$", + "title": "Camera Identifier", + "type": "string", + "defaultSnippets": [{ "label": "New Identifier", "body": "$1:$2" }] +} diff --git a/vscode-settings.json b/vscode-settings.json index aacde28e..9abbaa68 100644 --- a/vscode-settings.json +++ b/vscode-settings.json @@ -206,42 +206,6 @@ ], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/biomes/biomes.json" }, - { - "fileMatch": [ - "behavior_packs/*/dialogue/*.{json,jsonc,json5}", - "*behavior*pack*/dialogue/*.{json,jsonc,json5}", - "*Behavior*Pack*/dialogue/*.{json,jsonc,json5}", - "*BP*/dialogue/*.{json,jsonc,json5}", - "*bp*/dialogue/*.{json,jsonc,json5}", - "behavior_packs/*/dialogue/**/*.{json,jsonc,json5}", - "*behavior*pack*/dialogue/**/*.{json,jsonc,json5}", - "*Behavior*Pack*/dialogue/**/*.{json,jsonc,json5}", - "*BP*/dialogue/**/*.{json,jsonc,json5}", - "*bp*/dialogue/**/*.{json,jsonc,json5}", - "*.{diag,dialogue,dialog,d}.{json,jsonc,json5}" - ], - "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/dialogue/dialogue.json" - }, - { - "fileMatch": ["functions/tick.{json,jsonc,json5}"], - "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/functions/tick.json" - }, - { - "fileMatch": [ - "behavior_packs/*/loot_tables/*.{json,jsonc,json5}", - "*behavior*pack*/loot_tables/*.{json,jsonc,json5}", - "*Behavior*Pack*/loot_tables/*.{json,jsonc,json5}", - "*BP*/loot_tables/*.{json,jsonc,json5}", - "*bp*/loot_tables/*.{json,jsonc,json5}", - "behavior_packs/*/loot_tables/**/*.{json,jsonc,json5}", - "*behavior*pack*/loot_tables/**/*.{json,jsonc,json5}", - "*Behavior*Pack*/loot_tables/**/*.{json,jsonc,json5}", - "*BP*/loot_tables/**/*.{json,jsonc,json5}", - "*bp*/loot_tables/**/*.{json,jsonc,json5}", - "*.{loot,loot_table,lt}.{json,jsonc,json5}" - ], - "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/loot_tables/loot_tables.json" - }, { "fileMatch": [ "behavior_packs/*/blocks/*.{json,jsonc,json5}", @@ -258,6 +222,26 @@ ], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/blocks/blocks.json" }, + { + "fileMatch": ["cameras/presets/*.{json,jsonc,json5}"], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/cameras/presets/camera.json" + }, + { + "fileMatch": [ + "behavior_packs/*/dialogue/*.{json,jsonc,json5}", + "*behavior*pack*/dialogue/*.{json,jsonc,json5}", + "*Behavior*Pack*/dialogue/*.{json,jsonc,json5}", + "*BP*/dialogue/*.{json,jsonc,json5}", + "*bp*/dialogue/*.{json,jsonc,json5}", + "behavior_packs/*/dialogue/**/*.{json,jsonc,json5}", + "*behavior*pack*/dialogue/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/dialogue/**/*.{json,jsonc,json5}", + "*BP*/dialogue/**/*.{json,jsonc,json5}", + "*bp*/dialogue/**/*.{json,jsonc,json5}", + "*.{diag,dialogue,dialog,d}.{json,jsonc,json5}" + ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/dialogue/dialogue.json" + }, { "fileMatch": [ "behavior_packs/*/entities/*.{json,jsonc,json5}", @@ -275,6 +259,10 @@ ], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/entities/entities.json" }, + { + "fileMatch": ["functions/tick.{json,jsonc,json5}"], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/functions/tick.json" + }, { "fileMatch": [ "behavior_packs/*/features/*.{json,jsonc,json5}", @@ -327,6 +315,22 @@ "fileMatch": ["recipes/*.{json,jsonc,json5}", "recipes/**/*.{json,jsonc,json5}", "*.{recipe,crafting_recipe,cr,r}.{json,jsonc,json5}"], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/recipes/recipes.json" }, + { + "fileMatch": [ + "behavior_packs/*/loot_tables/*.{json,jsonc,json5}", + "*behavior*pack*/loot_tables/*.{json,jsonc,json5}", + "*Behavior*Pack*/loot_tables/*.{json,jsonc,json5}", + "*BP*/loot_tables/*.{json,jsonc,json5}", + "*bp*/loot_tables/*.{json,jsonc,json5}", + "behavior_packs/*/loot_tables/**/*.{json,jsonc,json5}", + "*behavior*pack*/loot_tables/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/loot_tables/**/*.{json,jsonc,json5}", + "*BP*/loot_tables/**/*.{json,jsonc,json5}", + "*bp*/loot_tables/**/*.{json,jsonc,json5}", + "*.{loot,loot_table,lt}.{json,jsonc,json5}" + ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/loot_tables/loot_tables.json" + }, { "fileMatch": ["spawn_rules/*.{json,jsonc,json5}", "spawn_rules/**/*.{json,jsonc,json5}", "*.{spawn,sr,spawn_rule}.{json,jsonc,json5}"], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/spawn_rules/spawn_rules.json"