@minecraft/creator-tools 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +22 -0
- package/app/Carto.js +20 -8
- package/app/IProjectItemData.js +4 -2
- package/app/LookupUtilities.js +223 -0
- package/app/Project.js +96 -34
- package/app/ProjectExporter.js +1 -1
- package/app/ProjectIntegrator.js +1 -1
- package/app/ProjectItem.js +4 -1
- package/app/ProjectItemRelations.js +20 -0
- package/app/ProjectItemUtilities.js +203 -1
- package/app/ProjectLookupUtilities.js +152 -0
- package/app/ProjectUtilities.js +73 -15
- package/cli/ClUtils.js +1 -1
- package/cli/IProjectStartInfo.js +0 -1
- package/cli/ISearchResultSet.js +4 -0
- package/cli/ITask.js +0 -1
- package/cli/TaskWorker.js +0 -1
- package/core/Constants.js +1 -1
- package/core/ContentIndex.js +92 -44
- package/core/StandardInit.js +14 -14
- package/core/Utilities.js +60 -1
- package/data/forms/biome/biome_description.form.json +12 -0
- package/data/forms/biome/biome_json_file.form.json +688 -0
- package/data/forms/biome/index.json +1 -0
- package/data/forms/biome/minecraft_capped_surface.form.json +52 -0
- package/data/forms/biome/minecraft_climate.form.json +49 -0
- package/data/forms/biome/minecraft_creature_spawn_probability.form.json +13 -0
- package/data/forms/biome/minecraft_frozen_ocean_surface.form.json +68 -0
- package/data/forms/biome/minecraft_mesa_surface.form.json +102 -0
- package/data/forms/biome/minecraft_mountain_parameters.form.json +54 -0
- package/data/forms/biome/minecraft_multinoise_generation_rules.form.json +37 -0
- package/data/forms/biome/minecraft_overworld_generation_rules.form.json +42 -0
- package/data/forms/biome/minecraft_overworld_height.form.json +19 -0
- package/data/forms/biome/minecraft_surface_material_adjustments.form.json +68 -0
- package/data/forms/biome/minecraft_surface_parameters.form.json +68 -0
- package/data/forms/biome/minecraft_swamp_surface.form.json +68 -0
- package/data/forms/biome/minecraft_tags.form.json +13 -0
- package/data/forms/biome/minecraft_the_end_surface.form.json +6 -0
- package/data/forms/block/block_resource_nonvisual.form.json +13 -0
- package/data/forms/block/block_resource_visual.form.json +26 -0
- package/data/forms/block/block_specifier.form.json +3 -3
- package/data/forms/block/blockstate_boolean.form.json +2 -2
- package/data/forms/block/blockstate_number.form.json +3 -3
- package/data/forms/block/blockstate_string.form.json +3 -3
- package/data/forms/block/index.json +1 -1
- package/data/forms/block/materialinstanceface.form.json +4 -2
- package/data/forms/block/minecraft_bone_visibility.form.json +3 -0
- package/data/forms/block/minecraft_breathability.form.json +18 -6
- package/data/forms/block/minecraft_collision_box.form.json +8 -5
- package/data/forms/block/minecraft_destructible_by_explosion.form.json +8 -5
- package/data/forms/block/minecraft_destructible_by_mining.form.json +58 -10
- package/data/forms/block/minecraft_destruction_particles.form.json +43 -8
- package/data/forms/block/minecraft_display_name.form.json +4 -4
- package/data/forms/block/minecraft_flammable.form.json +8 -5
- package/data/forms/block/minecraft_friction.form.json +5 -5
- package/data/forms/block/minecraft_geometry.form.json +3 -0
- package/data/forms/block/minecraft_item_visual.form.json +3 -0
- package/data/forms/block/minecraft_light_dampening.form.json +4 -4
- package/data/forms/block/minecraft_light_emission.form.json +4 -4
- package/data/forms/block/minecraft_loot.form.json +5 -5
- package/data/forms/block/minecraft_map_color.form.json +3 -0
- package/data/forms/block/minecraft_material_instances.form.json +4 -1
- package/data/forms/block/minecraft_selection_box.form.json +8 -5
- package/data/forms/block/minecraft_transformation.form.json +3 -0
- package/data/forms/block/minecraft_unit_cube.form.json +3 -0
- package/data/forms/block/struct_sharedtypes_v1_20_60_blockculling.form.json +48 -0
- package/data/forms/block/trait_placement_direction.form.json +25 -2
- package/data/forms/block/trait_placement_position.form.json +19 -1
- package/data/forms/cameras/index.json +1 -0
- package/data/forms/cameras/struct_sharedtypes_v1_21_70_camerapresetfile.form.json +18 -0
- package/data/forms/clientbiome/client_biome_description.form.json +12 -0
- package/data/forms/clientbiome/client_biome_json_file.form.json +198 -0
- package/data/forms/clientbiome/index.json +1 -0
- package/data/forms/clientbiome/minecraft_ambient_sounds.form.json +25 -0
- package/data/forms/clientbiome/minecraft_biome_music.form.json +13 -0
- package/data/forms/clientbiome/minecraft_fog_appearance.form.json +13 -0
- package/data/forms/clientbiome/minecraft_foliage_appearance.form.json +21 -0
- package/data/forms/clientbiome/minecraft_grass_appearance.form.json +13 -0
- package/data/forms/clientbiome/minecraft_sky_color.form.json +21 -0
- package/data/forms/clientbiome/minecraft_water_appearance.form.json +27 -0
- package/data/forms/config/commands.form.json +18 -0
- package/data/forms/config/index.json +1 -0
- package/data/forms/entity/minecraft_anger_level.form.json +41 -40
- package/data/forms/entity/minecraft_attack_cooldown.form.json +0 -1
- package/data/forms/entity/minecraft_barter.form.json +0 -1
- package/data/forms/entity/minecraft_behavior_avoid_block.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_avoid_mob_type.form.json +11 -16
- package/data/forms/entity/minecraft_behavior_defend_village_target.form.json +64 -58
- package/data/forms/entity/minecraft_behavior_delayed_attack.form.json +6 -19
- package/data/forms/entity/minecraft_behavior_dig.form.json +1 -0
- package/data/forms/entity/minecraft_behavior_dragonflaming.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_emerge.form.json +2 -2
- package/data/forms/entity/minecraft_behavior_float_wander.form.json +35 -0
- package/data/forms/entity/minecraft_behavior_follow_mob.form.json +19 -0
- package/data/forms/entity/minecraft_behavior_go_and_give_items_to_noteblock.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_go_and_give_items_to_owner.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_go_home.form.json +2 -2
- package/data/forms/entity/minecraft_behavior_melee_attack.form.json +6 -19
- package/data/forms/entity/minecraft_behavior_melee_box_attack.form.json +17 -35
- package/data/forms/entity/minecraft_behavior_move_around_target.form.json +12 -17
- package/data/forms/entity/minecraft_behavior_nearest_attackable_target.form.json +1959 -180
- package/data/forms/entity/minecraft_behavior_play.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_play_dead.form.json +1 -1
- package/data/forms/entity/minecraft_behavior_ram_attack.form.json +3 -3
- package/data/forms/entity/minecraft_behavior_random_search_and_dig.form.json +3 -3
- package/data/forms/entity/minecraft_behavior_sneeze.form.json +19 -18
- package/data/forms/entity/minecraft_behavior_stomp_attack.form.json +6 -19
- package/data/forms/entity/minecraft_behavior_swim_with_entity.form.json +1 -1
- package/data/forms/entity/minecraft_breathable.form.json +5 -4
- package/data/forms/entity/minecraft_dweller.form.json +20 -0
- package/data/forms/entity/minecraft_environment_sensor.form.json +12 -0
- package/data/forms/entity/minecraft_is_baby.form.json +60 -2
- package/data/forms/entity/minecraft_leashable.form.json +0 -3
- package/data/forms/entity/minecraft_movement.form.json +111 -0
- package/data/forms/entity/minecraft_navigation_walk.form.json +4 -2
- package/data/forms/entity/minecraft_rideable.form.json +19 -0
- package/data/forms/entity/minecraft_shooter.form.json +27 -26
- package/data/forms/entity/minecraft_type_family.form.json +40 -4
- package/data/forms/entityevents/emit_vibration.form.json +1 -0
- package/data/forms/entityfilters/actor_health.form.json +65 -6
- package/data/forms/entityfilters/all_slots_empty.form.json +1 -0
- package/data/forms/entityfilters/any_slot_empty.form.json +1 -0
- package/data/forms/entityfilters/bool_property.form.json +63 -10
- package/data/forms/entityfilters/clock_time.form.json +1 -0
- package/data/forms/entityfilters/enum_property.form.json +362 -37
- package/data/forms/entityfilters/has_biome_tag.form.json +564 -90
- package/data/forms/entityfilters/has_component.form.json +454 -63
- package/data/forms/entityfilters/has_equipment.form.json +104 -7
- package/data/forms/entityfilters/has_nametag.form.json +57 -10
- package/data/forms/entityfilters/has_ranged_weapon.form.json +124 -14
- package/data/forms/entityfilters/in_block.form.json +84 -7
- package/data/forms/entityfilters/in_caravan.form.json +31 -3
- package/data/forms/entityfilters/in_contact_with_water.form.json +67 -6
- package/data/forms/entityfilters/in_lava.form.json +569 -92
- package/data/forms/entityfilters/in_nether.form.json +94 -9
- package/data/forms/entityfilters/in_water.form.json +113 -11
- package/data/forms/entityfilters/in_water_or_rain.form.json +59 -4
- package/data/forms/entityfilters/int_property.form.json +78 -6
- package/data/forms/entityfilters/is_biome.form.json +70 -6
- package/data/forms/entityfilters/is_block.form.json +122 -10
- package/data/forms/entityfilters/is_brightness.form.json +73 -6
- package/data/forms/entityfilters/is_daytime.form.json +70 -11
- package/data/forms/entityfilters/is_difficulty.form.json +128 -17
- package/data/forms/entityfilters/is_family.form.json +2381 -341
- package/data/forms/entityfilters/is_game_rule.form.json +27 -2
- package/data/forms/entityfilters/is_mark_variant.form.json +145 -14
- package/data/forms/entityfilters/is_riding.form.json +101 -8
- package/data/forms/entityfilters/is_skin_id.form.json +137 -14
- package/data/forms/entityfilters/is_snow_covered.form.json +48 -5
- package/data/forms/entityfilters/is_underground.form.json +26 -2
- package/data/forms/entityfilters/is_underwater.form.json +139 -17
- package/data/forms/entityfilters/is_variant.form.json +110 -9
- package/data/forms/entityfilters/weather_at_position.form.json +76 -8
- package/data/forms/index.json +1 -1
- package/data/forms/item/index.json +1 -1
- package/data/forms/item/minecraft_allow_off_hand.form.json +1 -0
- package/data/forms/item/minecraft_block_placer.form.json +2 -1
- package/data/forms/item/minecraft_bundle_interaction.form.json +2 -1
- package/data/forms/item/minecraft_can_destroy_in_creative.form.json +1 -0
- package/data/forms/item/minecraft_chargeable.form.json +4 -4
- package/data/forms/item/minecraft_compostable.form.json +2 -1
- package/data/forms/item/minecraft_cooldown.form.json +2 -1
- package/data/forms/item/minecraft_custom_components.form.json +6 -0
- package/data/forms/item/minecraft_damage.form.json +1 -0
- package/data/forms/item/minecraft_damage_absorption.form.json +2 -1
- package/data/forms/item/minecraft_digger.form.json +2 -1
- package/data/forms/item/minecraft_display_name.form.json +2 -1
- package/data/forms/item/minecraft_durability.form.json +2 -1
- package/data/forms/item/minecraft_durability_sensor.form.json +9 -2
- package/data/forms/item/minecraft_dyeable.form.json +2 -1
- package/data/forms/item/minecraft_enchantable.form.json +2 -1
- package/data/forms/item/minecraft_entity_placer.form.json +2 -1
- package/data/forms/item/minecraft_food.form.json +2 -1
- package/data/forms/item/minecraft_fuel.form.json +1 -0
- package/data/forms/item/minecraft_glint.form.json +1 -0
- package/data/forms/item/minecraft_hand_equipped.form.json +1 -0
- package/data/forms/item/minecraft_hover_text_color.form.json +1 -0
- package/data/forms/item/minecraft_icon.form.json +1 -0
- package/data/forms/item/minecraft_interact_button.form.json +3 -1
- package/data/forms/item/minecraft_item.form.json +2 -14
- package/data/forms/item/minecraft_liquid_clipped.form.json +1 -0
- package/data/forms/item/minecraft_max_stack_size.form.json +1 -0
- package/data/forms/item/minecraft_on_use.form.json +1 -0
- package/data/forms/item/minecraft_on_use_on.form.json +1 -0
- package/data/forms/item/minecraft_projectile.form.json +2 -1
- package/data/forms/item/minecraft_rarity.form.json +16 -1
- package/data/forms/item/minecraft_record.form.json +2 -1
- package/data/forms/item/minecraft_repairable.form.json +2 -1
- package/data/forms/item/minecraft_shooter.form.json +2 -1
- package/data/forms/item/minecraft_should_despawn.form.json +1 -0
- package/data/forms/item/minecraft_stacked_by_data.form.json +1 -0
- package/data/forms/item/minecraft_storage_item.form.json +2 -1
- package/data/forms/item/minecraft_storage_weight_limit.form.json +13 -0
- package/data/forms/item/minecraft_storage_weight_modifier.form.json +13 -0
- package/data/forms/item/minecraft_tags.form.json +2 -1
- package/data/forms/item/minecraft_throwable.form.json +2 -1
- package/data/forms/item/minecraft_use_animation.form.json +1 -0
- package/data/forms/item/minecraft_use_duration.form.json +1 -0
- package/data/forms/item/minecraft_use_modifiers.form.json +2 -1
- package/data/forms/item/minecraft_wearable.form.json +2 -1
- package/data/forms/mctoolsval/caddonreq.form.json +579 -0
- package/data/forms/mctoolsval/index.json +1 -0
- package/data/forms/misc/crafting_catalog_category.form.json +18 -0
- package/data/forms/misc/crafting_catalog_document.form.json +12 -0
- package/data/forms/misc/dimensiondocument.form.json +12 -0
- package/data/forms/misc/emitter_initialization.form.json +28 -0
- package/data/forms/misc/emitter_lifetime_expression.form.json +28 -0
- package/data/forms/misc/emitter_lifetime_looping.form.json +28 -0
- package/data/forms/misc/emitter_lifetime_once.form.json +17 -0
- package/data/forms/misc/emitter_rate_instant.form.json +17 -0
- package/data/forms/misc/emitter_rate_manual.form.json +17 -0
- package/data/forms/misc/emitter_rate_steady.form.json +28 -0
- package/data/forms/misc/emitter_shape_box.form.json +35 -0
- package/data/forms/misc/emitter_shape_custom.form.json +18 -0
- package/data/forms/misc/emitter_shape_disc.form.json +51 -0
- package/data/forms/misc/emitter_shape_entity_aabb.form.json +23 -0
- package/data/forms/misc/emitter_shape_point.form.json +18 -0
- package/data/forms/misc/emitter_shape_sphere.form.json +40 -0
- package/data/forms/misc/index.json +1 -1
- package/data/forms/misc/minecraft_aim_assist_categories.form.json +18 -0
- package/data/forms/misc/minecraft_aim_assist_preset.form.json +18 -0
- package/data/forms/misc/minecraft_jigsaw_structure_metadata.form.json +18 -0
- package/data/forms/misc/particle_appearance_billboard.form.json +143 -0
- package/data/forms/misc/particle_appearance_billboard_flipbook_data_1.21.0.form.json +53 -0
- package/data/forms/misc/particle_appearance_tinting.form.json +17 -0
- package/data/forms/misc/particle_curve_bezier_chain.form.json +29 -0
- package/data/forms/misc/particle_curve_linear.form.json +40 -0
- package/data/forms/misc/particle_effect.form.json +1073 -0
- package/data/forms/misc/particle_effect_basic_render_parameters.form.json +18 -0
- package/data/forms/misc/particle_effect_component.form.json +1007 -0
- package/data/forms/spawn/index.json +1 -1
- package/data/forms/spawn/struct_sharedtypes_v1_21_60_spawn_contents.form.json +24 -0
- package/data/forms/world/feature_rule_definition.form.json +91 -0
- package/data/forms/world/index.json +1 -1
- package/data/forms/world/scatter_params.form.json +67 -0
- package/data/gallery.json +42 -2
- package/data/mci/release.mci.json +1 -1
- package/data/snippets/index.json +1 -0
- package/data/snippets/new-templates.json +25 -0
- package/dataform/DataFormUtilities.js +3 -3
- package/dataform/FieldUtilities.js +13 -0
- package/dataform/IField.js +7 -1
- package/dataform/ILookupProvider.js +4 -0
- package/docgen/FormJsonDocumentationGenerator.js +302 -279
- package/docgen/FormMarkdownDocumentationGenerator.js +140 -3
- package/docgen/JsonSchemaGenerator.js +121 -0
- package/info/CooperativeAddOnItemRequirementsGenerator.js +18 -17
- package/info/CooperativeAddOnRequirementsGenerator.js +21 -17
- package/info/GeneratorRegistrations.js +22 -9
- package/info/IInfoItemData.js +1 -0
- package/info/JsonFileTagsInfoGenerator.js +35 -30
- package/info/LineSizeInfoGenerator.js +1 -0
- package/info/PackInfoGenerator.js +3 -2
- package/info/PackSizeInfoGenerator.js +1 -0
- package/info/PathLengthFileGenerator.js +5 -4
- package/info/ProjectInfoSet.js +57 -10
- package/info/SchemaItemInfoGenerator.js +1 -0
- package/info/StrictPlatformInfoGenerator.js +4 -3
- package/info/TextureImageInfoGenerator.js +148 -27
- package/info/TextureInfoGenerator.js +43 -27
- package/info/TextureReferenceInfoGenerator.js +80 -0
- package/info/TypesInfoGenerator.js +71 -0
- package/info/UnknownFileGenerator.js +2 -1
- package/info/UnknownItemGenerator.js +2 -1
- package/info/UnlinkedItemInfoGenerator.js +30 -56
- package/info/ValidFileGenerator.js +47 -0
- package/info/WorldDataInfoGenerator.js +2 -2
- package/integrations/BlockbenchModel.js +86 -51
- package/local/NodeFile.js +8 -0
- package/manager/BaseGameVersionManager.js +1 -17
- package/manager/BlocksCatalogManager.js +102 -0
- package/manager/{BehaviorPackEntityTypeManager.js → EntityTypeManager.js} +38 -76
- package/manager/FormatVersionManager.js +23 -40
- package/manager/{BehaviorPackItemTypeManager.js → ItemTypeManager.js} +45 -80
- package/manager/MinEngineVersionManager.js +4 -11
- package/manager/ScriptModuleManager.js +0 -12
- package/maps/app/Carto.js.map +1 -1
- package/maps/app/IGalleryItem.js.map +1 -1
- package/maps/app/IProjectData.js.map +1 -1
- package/maps/app/IProjectItemData.js.map +1 -1
- package/maps/app/IProjectSeed.js.map +1 -1
- package/maps/app/LookupUtilities.js.map +1 -0
- package/maps/app/Project.js.map +1 -1
- package/maps/app/ProjectExporter.js.map +1 -1
- package/maps/app/ProjectIntegrator.js.map +1 -1
- package/maps/app/ProjectItem.js.map +1 -1
- package/maps/app/ProjectItemRelations.js.map +1 -1
- package/maps/app/ProjectItemUtilities.js.map +1 -1
- package/maps/app/ProjectLookupUtilities.js.map +1 -0
- package/maps/app/ProjectUtilities.js.map +1 -1
- package/maps/cli/ClUtils.js.map +1 -1
- package/maps/cli/ISearchResultSet.js.map +1 -0
- package/maps/core/Constants.js.map +1 -1
- package/maps/core/ContentIndex.js.map +1 -1
- package/maps/core/ISimpleReference.js.map +1 -1
- package/maps/core/StandardInit.js.map +1 -1
- package/maps/core/Utilities.js.map +1 -1
- package/maps/dataform/DataFormUtilities.js.map +1 -1
- package/maps/dataform/FieldUtilities.js.map +1 -1
- package/maps/dataform/IField.js.map +1 -1
- package/maps/dataform/IFormDefinition.js.map +1 -1
- package/maps/dataform/IGetSetPropertyObject.js.map +1 -1
- package/maps/dataform/ILookupProvider.js.map +1 -0
- package/maps/docgen/FormJsonDocumentationGenerator.js.map +1 -1
- package/maps/docgen/FormMarkdownDocumentationGenerator.js.map +1 -1
- package/maps/docgen/JsonSchemaGenerator.js.map +1 -0
- package/maps/info/CooperativeAddOnItemRequirementsGenerator.js.map +1 -1
- package/maps/info/CooperativeAddOnRequirementsGenerator.js.map +1 -1
- package/maps/info/GeneratorRegistrations.js.map +1 -1
- package/maps/info/IInfoItemData.js.map +1 -1
- package/maps/info/IProjectInfo.js.map +1 -1
- package/maps/info/IProjectInfoGeneratorBase.js.map +1 -1
- package/maps/info/JsonFileTagsInfoGenerator.js.map +1 -1
- package/maps/info/LineSizeInfoGenerator.js.map +1 -1
- package/maps/info/PackInfoGenerator.js.map +1 -1
- package/maps/info/PackSizeInfoGenerator.js.map +1 -1
- package/maps/info/PathLengthFileGenerator.js.map +1 -1
- package/maps/info/ProjectInfoItem.js.map +1 -1
- package/maps/info/ProjectInfoSet.js.map +1 -1
- package/maps/info/SchemaItemInfoGenerator.js.map +1 -1
- package/maps/info/StrictPlatformInfoGenerator.js.map +1 -1
- package/maps/info/TextureImageInfoGenerator.js.map +1 -1
- package/maps/info/TextureInfoGenerator.js.map +1 -1
- package/maps/info/TextureReferenceInfoGenerator.js.map +1 -0
- package/maps/info/TypesInfoGenerator.js.map +1 -0
- package/maps/info/UnknownFileGenerator.js.map +1 -1
- package/maps/info/UnknownItemGenerator.js.map +1 -1
- package/maps/info/UnlinkedItemInfoGenerator.js.map +1 -1
- package/maps/info/ValidFileGenerator.js.map +1 -0
- package/maps/info/WorldDataInfoGenerator.js.map +1 -1
- package/maps/integrations/BlockbenchModel.js.map +1 -1
- package/maps/local/NodeFile.js.map +1 -1
- package/maps/manager/BaseGameVersionManager.js.map +1 -1
- package/maps/manager/BlocksCatalogManager.js.map +1 -0
- package/maps/manager/EntityTypeManager.js.map +1 -0
- package/maps/manager/FormatVersionManager.js.map +1 -1
- package/maps/manager/ItemTypeManager.js.map +1 -0
- package/maps/manager/MinEngineVersionManager.js.map +1 -1
- package/maps/manager/ScriptModuleManager.js.map +1 -1
- package/maps/minecraft/AttachableResourceDefinition.js.map +1 -1
- package/maps/minecraft/AudioDefinition.js.map +1 -0
- package/maps/minecraft/BlockType.js.map +1 -1
- package/maps/minecraft/BlockTypeDefinition.js.map +1 -1
- package/maps/minecraft/BlocksCatalogDefinition.js.map +1 -1
- package/maps/minecraft/ComponentizedBase.js.map +1 -1
- package/maps/minecraft/Database.js.map +1 -1
- package/maps/minecraft/EntityTypeDefinition.js.map +1 -1
- package/maps/minecraft/EntityTypeResourceDefinition.js.map +1 -1
- package/maps/minecraft/FlipbookTextureCatalogDefinition.js.map +1 -1
- package/maps/minecraft/IBlockTypeBehaviorPack.js.map +1 -1
- package/maps/minecraft/IBlockTypeDescription.js.map +1 -1
- package/maps/minecraft/IBlocksCatalog.js.map +1 -1
- package/maps/minecraft/IComponentDataItem.js.map +1 -1
- package/maps/minecraft/IComponentGroup.js.map +1 -1
- package/maps/minecraft/IEntitiesMetadata.js.map +1 -0
- package/maps/minecraft/IItemTypeBehaviorPack.js.map +1 -1
- package/maps/minecraft/IItemTypeResourcePack.js.map +1 -0
- package/maps/minecraft/IItemsMetadata.js.map +1 -0
- package/maps/minecraft/IJsonUIScreen.js.map +1 -1
- package/maps/minecraft/IManagedComponent.js.map +1 -1
- package/maps/minecraft/IManagedComponentSetItem.js.map +1 -1
- package/maps/minecraft/IMolangExpression.js.map +1 -0
- package/maps/minecraft/IMolangNode.js.map +1 -0
- package/maps/minecraft/ItemTextureCatalogDefinition.js.map +1 -1
- package/maps/minecraft/ItemTypeBehaviorDefinition.js.map +1 -1
- package/maps/minecraft/ItemTypeResourceDefinition.js.map +1 -0
- package/maps/minecraft/JsonUIResourceDefinition.js.map +1 -1
- package/maps/minecraft/MCWorld.js.map +1 -1
- package/maps/minecraft/ManagedComponent.js.map +1 -1
- package/maps/minecraft/ManagedComponentGroup.js.map +1 -1
- package/maps/minecraft/ManagedPermutation.js.map +1 -0
- package/maps/minecraft/MinecraftDefinitions.js.map +1 -1
- package/maps/minecraft/MinecraftUtilities.js.map +1 -1
- package/maps/minecraft/MusicDefinitionCatalogDefinition.js.map +1 -1
- package/maps/minecraft/ParticleEffectResourceDefinition.js.map +1 -1
- package/maps/minecraft/SoundCatalogDefinition.js.map +1 -1
- package/maps/minecraft/SoundDefinitionCatalogDefinition.js.map +1 -1
- package/maps/minecraft/TerrainTextureCatalogDefinition.js.map +1 -1
- package/maps/minecraft/TextureDefinition.js.map +1 -0
- package/maps/minecraft/TypeScriptDefinition.js.map +1 -0
- package/maps/storage/BrowserFile.js.map +1 -1
- package/maps/storage/FileBase.js.map +1 -1
- package/maps/storage/FileSystemFolder.js.map +1 -1
- package/maps/storage/IFile.js.map +1 -1
- package/maps/storage/StorageUtilities.js.map +1 -1
- package/maps/updates/ProjectUpdateRunner.js.map +1 -1
- package/minecraft/AttachableResourceDefinition.js +9 -12
- package/minecraft/{AudioFileDefinition.js → AudioDefinition.js} +25 -5
- package/minecraft/BlockType.js +9 -5
- package/minecraft/BlockTypeDefinition.js +434 -13
- package/minecraft/BlocksCatalogDefinition.js +92 -1
- package/minecraft/ComponentizedBase.js +4 -3
- package/minecraft/Database.js +118 -7
- package/minecraft/EntityTypeDefinition.js +10 -7
- package/minecraft/EntityTypeResourceDefinition.js +9 -12
- package/minecraft/FlipbookTextureCatalogDefinition.js +13 -6
- package/minecraft/IEntitiesMetadata.js +4 -0
- package/minecraft/IItemTypeResourcePack.js +6 -0
- package/minecraft/IItemsMetadata.js +4 -0
- package/minecraft/IMolangExpression.js +4 -0
- package/minecraft/IMolangNode.js +15 -0
- package/minecraft/ItemTextureCatalogDefinition.js +47 -11
- package/minecraft/ItemTypeBehaviorDefinition.js +7 -4
- package/minecraft/ItemTypeResourceDefinition.js +201 -0
- package/minecraft/JsonUIResourceDefinition.js +99 -0
- package/minecraft/MCWorld.js +9 -2
- package/minecraft/ManagedComponent.js +13 -1
- package/minecraft/ManagedComponentGroup.js +9 -5
- package/minecraft/ManagedPermutation.js +111 -0
- package/minecraft/MinecraftDefinitions.js +2 -2
- package/minecraft/MinecraftUtilities.js +19 -0
- package/minecraft/MusicDefinitionCatalogDefinition.js +1 -1
- package/minecraft/ParticleEffectResourceDefinition.js +8 -10
- package/minecraft/SoundCatalogDefinition.js +9 -3
- package/minecraft/SoundDefinitionCatalogDefinition.js +79 -49
- package/minecraft/TerrainTextureCatalogDefinition.js +67 -6
- package/minecraft/TextureDefinition.js +109 -0
- package/minecraft/TypeScriptDefinition.js +65 -0
- package/package.json +2 -1
- package/storage/BrowserFile.js +5 -0
- package/storage/FileSystemFolder.js +27 -0
- package/storage/StorageUtilities.js +21 -3
- package/updates/ProjectUpdateRunner.js +3 -18
- package/maps/manager/BehaviorPackEntityTypeManager.js.map +0 -1
- package/maps/manager/BehaviorPackItemTypeManager.js.map +0 -1
- package/maps/minecraft/AudioFileDefinition.js.map +0 -1
package/NOTICE.md
CHANGED
|
@@ -4,6 +4,28 @@ Copyright 2024 Mojang AB
|
|
|
4
4
|
|
|
5
5
|
This repository incorporates material as listed below or described in the code.
|
|
6
6
|
|
|
7
|
+
### @lunapaint/tga-codec
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2022, Daniel Imms (https://github.com/Tyriar)
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in
|
|
19
|
+
all copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27
|
+
THE SOFTWARE.
|
|
28
|
+
|
|
7
29
|
### waveform-playlist
|
|
8
30
|
|
|
9
31
|
#### MIT License
|
package/app/Carto.js
CHANGED
|
@@ -961,18 +961,30 @@ class Carto {
|
|
|
961
961
|
}
|
|
962
962
|
return newProjectName;
|
|
963
963
|
}
|
|
964
|
-
async createNewProject(newProjectName, newProjectPath, focus, includeDefaultItems, projectLanguage) {
|
|
964
|
+
async createNewProject(newProjectName, newProjectPath, newProjectFolder, newProjectFolderTitle, focus, includeDefaultItems, projectLanguage) {
|
|
965
965
|
await this.load();
|
|
966
966
|
const targetProjectName = await this.getNewProjectName(newProjectName);
|
|
967
|
-
|
|
967
|
+
let projectPrefs;
|
|
968
|
+
if (newProjectFolder) {
|
|
969
|
+
projectPrefs = await newProjectFolder.ensureFileFromRelativePath("/.mct/prefs.mctp.json");
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
projectPrefs = await this.prefsProjectsFolder.createFile(targetProjectName + ".json");
|
|
973
|
+
}
|
|
968
974
|
const newProject = new Project_1.default(this, targetProjectName, projectPrefs);
|
|
969
|
-
if (newProjectPath) {
|
|
975
|
+
if (newProjectPath && !newProjectFolder) {
|
|
970
976
|
newProject.mainDeployFolderPath = newProjectPath;
|
|
971
977
|
}
|
|
972
978
|
if (projectLanguage) {
|
|
973
979
|
newProject.preferredScriptLanguage = projectLanguage;
|
|
974
980
|
}
|
|
975
|
-
|
|
981
|
+
if (newProjectFolder) {
|
|
982
|
+
newProject.setProjectFolder(newProjectFolder);
|
|
983
|
+
newProject.projectFolderTitle = newProjectFolderTitle;
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
await newProject.ensureProjectFolder();
|
|
987
|
+
}
|
|
976
988
|
newProject.focus = focus;
|
|
977
989
|
if (includeDefaultItems) {
|
|
978
990
|
await newProject.ensureDefaultItems();
|
|
@@ -1056,7 +1068,7 @@ class Carto {
|
|
|
1056
1068
|
const project = this.getProjectByName(desiredProjectName);
|
|
1057
1069
|
const canonPath = StorageUtilities_1.default.canonicalizePath(messageProjectPath);
|
|
1058
1070
|
if (project !== undefined) {
|
|
1059
|
-
await project.
|
|
1071
|
+
await project.ensurePreferencesAndFolderLoadedFromFile();
|
|
1060
1072
|
if (project.mainDeployFolderPath !== undefined) {
|
|
1061
1073
|
if (canonPath === StorageUtilities_1.default.canonicalizePath(project.mainDeployFolderPath)) {
|
|
1062
1074
|
await project.ensureInflated();
|
|
@@ -1104,7 +1116,7 @@ class Carto {
|
|
|
1104
1116
|
project = this.getProjectByName(desiredProjectName);
|
|
1105
1117
|
}
|
|
1106
1118
|
if (project !== undefined && !openDirect) {
|
|
1107
|
-
await project.
|
|
1119
|
+
await project.ensurePreferencesAndFolderLoadedFromFile();
|
|
1108
1120
|
if (project.mainDeployFolderPath !== undefined) {
|
|
1109
1121
|
if (canonPath === StorageUtilities_1.default.canonicalizePath(project.mainDeployFolderPath)) {
|
|
1110
1122
|
await project.ensureInflated();
|
|
@@ -1130,7 +1142,7 @@ class Carto {
|
|
|
1130
1142
|
// now check all other projects to see if one exists.
|
|
1131
1143
|
for (let i = 0; i < this.projects.length; i++) {
|
|
1132
1144
|
project = this.projects[i];
|
|
1133
|
-
await project.
|
|
1145
|
+
await project.ensurePreferencesAndFolderLoadedFromFile();
|
|
1134
1146
|
if (project.mainDeployFolderPath !== undefined) {
|
|
1135
1147
|
if (canonPath === StorageUtilities_1.default.canonicalizePath(project.mainDeployFolderPath)) {
|
|
1136
1148
|
await project.ensureInflated();
|
|
@@ -1161,7 +1173,7 @@ class Carto {
|
|
|
1161
1173
|
await this.load();
|
|
1162
1174
|
for (let i = 0; i < this.projects.length; i++) {
|
|
1163
1175
|
const project = this.projects[i];
|
|
1164
|
-
await project.
|
|
1176
|
+
await project.ensurePreferencesAndFolderLoadedFromFile();
|
|
1165
1177
|
await project.ensureProjectFolder();
|
|
1166
1178
|
if (project.projectFolder) {
|
|
1167
1179
|
const projectTargetFolder = zipRoot.ensureFolder(project.name);
|
package/app/IProjectItemData.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.ProjectItemCreationType = exports.ProjectItemErrorStatus = exports.ProjectItemEditPreference = exports.ProjectItemStorageType = exports.ProjectItemType = exports.ProjectItemCategory = exports.MaxItemTypes = void 0;
|
|
6
|
-
exports.MaxItemTypes =
|
|
6
|
+
exports.MaxItemTypes = 129;
|
|
7
7
|
var ProjectItemCategory;
|
|
8
8
|
(function (ProjectItemCategory) {
|
|
9
9
|
ProjectItemCategory[ProjectItemCategory["assets"] = 0] = "assets";
|
|
@@ -14,6 +14,7 @@ var ProjectItemCategory;
|
|
|
14
14
|
ProjectItemCategory[ProjectItemCategory["meta"] = 5] = "meta";
|
|
15
15
|
ProjectItemCategory[ProjectItemCategory["package"] = 6] = "package";
|
|
16
16
|
ProjectItemCategory[ProjectItemCategory["unknown"] = 7] = "unknown";
|
|
17
|
+
ProjectItemCategory[ProjectItemCategory["mctools"] = 8] = "mctools";
|
|
17
18
|
})(ProjectItemCategory = exports.ProjectItemCategory || (exports.ProjectItemCategory = {}));
|
|
18
19
|
var ProjectItemType;
|
|
19
20
|
(function (ProjectItemType) {
|
|
@@ -69,7 +70,7 @@ var ProjectItemType;
|
|
|
69
70
|
ProjectItemType[ProjectItemType["materialsResourceJson"] = 49] = "materialsResourceJson";
|
|
70
71
|
ProjectItemType[ProjectItemType["musicDefinitionJson"] = 50] = "musicDefinitionJson";
|
|
71
72
|
ProjectItemType[ProjectItemType["soundDefinitionCatalog"] = 51] = "soundDefinitionCatalog";
|
|
72
|
-
ProjectItemType[ProjectItemType["
|
|
73
|
+
ProjectItemType[ProjectItemType["blockTypeResourceJsonDoNotUse"] = 52] = "blockTypeResourceJsonDoNotUse";
|
|
73
74
|
ProjectItemType[ProjectItemType["MCAddon"] = 53] = "MCAddon";
|
|
74
75
|
ProjectItemType[ProjectItemType["zip"] = 54] = "zip";
|
|
75
76
|
ProjectItemType[ProjectItemType["MCPack"] = 55] = "MCPack";
|
|
@@ -145,6 +146,7 @@ var ProjectItemType;
|
|
|
145
146
|
ProjectItemType[ProjectItemType["personaPackFolder"] = 126] = "personaPackFolder";
|
|
146
147
|
ProjectItemType[ProjectItemType["blockCulling"] = 127] = "blockCulling";
|
|
147
148
|
ProjectItemType[ProjectItemType["craftingItemCatalog"] = 128] = "craftingItemCatalog";
|
|
149
|
+
ProjectItemType[ProjectItemType["mcToolsProjectPreferences"] = 129] = "mcToolsProjectPreferences";
|
|
148
150
|
})(ProjectItemType = exports.ProjectItemType || (exports.ProjectItemType = {}));
|
|
149
151
|
var ProjectItemStorageType;
|
|
150
152
|
(function (ProjectItemStorageType) {
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Utilities_1 = require("../core/Utilities");
|
|
4
|
+
const Database_1 = require("../minecraft/Database");
|
|
5
|
+
const MinecraftUtilities_1 = require("../minecraft/MinecraftUtilities");
|
|
6
|
+
class LookupUtilities {
|
|
7
|
+
static async getLookup(lookupId) {
|
|
8
|
+
switch (lookupId) {
|
|
9
|
+
case "blockType":
|
|
10
|
+
return await this.getBlockTypeReferences();
|
|
11
|
+
case "entityType":
|
|
12
|
+
return await this.getEntityTypeReferences();
|
|
13
|
+
case "itemType":
|
|
14
|
+
return await this.getItemTypeReferences();
|
|
15
|
+
case "soundDefinition":
|
|
16
|
+
return await this.getSoundDefinitionReferences();
|
|
17
|
+
case "terrainTexture":
|
|
18
|
+
return await this.getTerrainTextureReferences();
|
|
19
|
+
case "entityTypeEvents":
|
|
20
|
+
break;
|
|
21
|
+
case "difficulty":
|
|
22
|
+
break;
|
|
23
|
+
case "damageCause":
|
|
24
|
+
break;
|
|
25
|
+
case "lootTable":
|
|
26
|
+
break;
|
|
27
|
+
case "entityTypePlusVariants":
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
static async getSoundDefinitionReferences() {
|
|
33
|
+
if (this.soundDefRefs) {
|
|
34
|
+
return this.soundDefRefs;
|
|
35
|
+
}
|
|
36
|
+
const soundData = await Database_1.default.getVanillaSoundDefinitionCatalog();
|
|
37
|
+
const refs = [];
|
|
38
|
+
if (soundData) {
|
|
39
|
+
const soundSets = soundData.getSoundDefinitionSetNameList();
|
|
40
|
+
if (soundSets) {
|
|
41
|
+
for (const soundSet of soundSets) {
|
|
42
|
+
refs.push({
|
|
43
|
+
id: soundSet,
|
|
44
|
+
title: Utilities_1.default.humanifyMinecraftName(soundSet),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
LookupUtilities.sortReferences(refs);
|
|
50
|
+
this.soundDefRefs = refs;
|
|
51
|
+
return this.soundDefRefs;
|
|
52
|
+
}
|
|
53
|
+
static async getItemTextureReferences() {
|
|
54
|
+
if (this.itemTextureRefs) {
|
|
55
|
+
return this.itemTextureRefs;
|
|
56
|
+
}
|
|
57
|
+
const itemData = await Database_1.default.getVanillaItemTexturesCatalog();
|
|
58
|
+
const refs = [];
|
|
59
|
+
if (itemData) {
|
|
60
|
+
const textureRefs = itemData.getTextureReferences();
|
|
61
|
+
if (textureRefs) {
|
|
62
|
+
for (const textureRef of textureRefs) {
|
|
63
|
+
refs.push({
|
|
64
|
+
id: textureRef,
|
|
65
|
+
title: Utilities_1.default.humanifyMinecraftName(textureRef),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
LookupUtilities.sortReferences(refs);
|
|
71
|
+
this.itemTextureRefs = refs;
|
|
72
|
+
return this.itemTextureRefs;
|
|
73
|
+
}
|
|
74
|
+
static async getTerrainTextureReferences() {
|
|
75
|
+
if (this.terrainTextureRefs) {
|
|
76
|
+
return this.terrainTextureRefs;
|
|
77
|
+
}
|
|
78
|
+
const terrainData = await Database_1.default.getVanillaTerrainTexturesCatalog();
|
|
79
|
+
const refs = [];
|
|
80
|
+
if (terrainData) {
|
|
81
|
+
const textureRefs = terrainData.getTextureReferences();
|
|
82
|
+
if (textureRefs) {
|
|
83
|
+
for (const textureRef of textureRefs) {
|
|
84
|
+
refs.push({
|
|
85
|
+
id: textureRef,
|
|
86
|
+
title: Utilities_1.default.humanifyMinecraftName(textureRef),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
LookupUtilities.sortReferences(refs);
|
|
92
|
+
this.terrainTextureRefs = refs;
|
|
93
|
+
return this.terrainTextureRefs;
|
|
94
|
+
}
|
|
95
|
+
static async getBlockTypeReferences() {
|
|
96
|
+
if (this.blockTypeRefs) {
|
|
97
|
+
return this.blockTypeRefs;
|
|
98
|
+
}
|
|
99
|
+
const blockData = await Database_1.default.getBlocksMetadata();
|
|
100
|
+
const refs = [];
|
|
101
|
+
if (blockData && blockData.data_items) {
|
|
102
|
+
for (const dataItem of blockData.data_items) {
|
|
103
|
+
if (dataItem.name && MinecraftUtilities_1.default.isBedrockItem(dataItem.name)) {
|
|
104
|
+
const iconImage = MinecraftUtilities_1.default.getBlockDefaultTexturePath(dataItem.name);
|
|
105
|
+
refs.push({
|
|
106
|
+
id: dataItem.name,
|
|
107
|
+
title: Utilities_1.default.humanifyMinecraftName(dataItem.name),
|
|
108
|
+
iconImage: iconImage ? "/res/latest/van/preview/resource_pack/" + iconImage + ".png" : undefined,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
LookupUtilities.sortReferences(refs);
|
|
114
|
+
this.blockTypeRefs = refs;
|
|
115
|
+
return this.blockTypeRefs;
|
|
116
|
+
}
|
|
117
|
+
static async getEntityTypeReferences() {
|
|
118
|
+
if (this.entityTypeRefs) {
|
|
119
|
+
return this.entityTypeRefs;
|
|
120
|
+
}
|
|
121
|
+
const entitiesData = await Database_1.default.getEntitiesMetadata();
|
|
122
|
+
const refs = [];
|
|
123
|
+
if (entitiesData && entitiesData.data_items) {
|
|
124
|
+
for (const dataItem of entitiesData.data_items) {
|
|
125
|
+
if (dataItem.name && MinecraftUtilities_1.default.isBedrockItem(dataItem.name)) {
|
|
126
|
+
refs.push({
|
|
127
|
+
id: dataItem.name,
|
|
128
|
+
title: Utilities_1.default.humanifyMinecraftName(dataItem.name),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
LookupUtilities.sortReferences(refs);
|
|
134
|
+
LookupUtilities.entityTypeRefs = refs;
|
|
135
|
+
return LookupUtilities.entityTypeRefs;
|
|
136
|
+
}
|
|
137
|
+
static async getItemTypeReferences() {
|
|
138
|
+
if (this.itemTypeRefs) {
|
|
139
|
+
return this.itemTypeRefs;
|
|
140
|
+
}
|
|
141
|
+
const itemsData = await Database_1.default.getItemsMetadata();
|
|
142
|
+
const refs = [];
|
|
143
|
+
if (itemsData && itemsData.data_items) {
|
|
144
|
+
for (const dataItem of itemsData.data_items) {
|
|
145
|
+
if (dataItem.name && MinecraftUtilities_1.default.isBedrockItem(dataItem.name)) {
|
|
146
|
+
refs.push({
|
|
147
|
+
id: dataItem.name,
|
|
148
|
+
title: Utilities_1.default.humanifyMinecraftName(dataItem.name),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
LookupUtilities.sortReferences(refs);
|
|
154
|
+
LookupUtilities.itemTypeRefs = refs;
|
|
155
|
+
return LookupUtilities.itemTypeRefs;
|
|
156
|
+
}
|
|
157
|
+
static appendReferences(core, references) {
|
|
158
|
+
if (references === undefined) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
for (const ref of references) {
|
|
162
|
+
let foundRef = false;
|
|
163
|
+
for (const targetRef of core) {
|
|
164
|
+
if (targetRef.id === ref.id) {
|
|
165
|
+
foundRef = true;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (!foundRef) {
|
|
169
|
+
core.push(ref);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
static sortReferences(references) {
|
|
174
|
+
references.sort((a, b) => {
|
|
175
|
+
if (a.title && b.title) {
|
|
176
|
+
return a.title.localeCompare(b.title);
|
|
177
|
+
}
|
|
178
|
+
if (a.id && b.id) {
|
|
179
|
+
return a.id.toString().localeCompare(b.id.toString());
|
|
180
|
+
}
|
|
181
|
+
return 0;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
static getReferencesFromAnnotatedValues(paths, annotationCategory, description, startsWithFilter) {
|
|
185
|
+
if (!paths) {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
let simpleRefs = [];
|
|
189
|
+
for (let path in paths) {
|
|
190
|
+
const val = paths[path];
|
|
191
|
+
if (path && val && (!startsWithFilter || path.startsWith(startsWithFilter))) {
|
|
192
|
+
if (startsWithFilter) {
|
|
193
|
+
path = path.substring(startsWithFilter.length);
|
|
194
|
+
}
|
|
195
|
+
for (const annotatedVal of val) {
|
|
196
|
+
if (annotatedVal.annotation === annotationCategory) {
|
|
197
|
+
simpleRefs.push({
|
|
198
|
+
id: path,
|
|
199
|
+
title: Utilities_1.default.humanifyMinecraftName(path),
|
|
200
|
+
description: description
|
|
201
|
+
? Utilities_1.default.stringFormat(description, Utilities_1.default.humanifyMinecraftName(path))
|
|
202
|
+
: undefined,
|
|
203
|
+
});
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (simpleRefs && simpleRefs.length === 0) {
|
|
210
|
+
return undefined;
|
|
211
|
+
}
|
|
212
|
+
return simpleRefs;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
exports.default = LookupUtilities;
|
|
216
|
+
LookupUtilities.blockTypeRefs = undefined;
|
|
217
|
+
LookupUtilities.entityTypeRefs = undefined;
|
|
218
|
+
LookupUtilities.itemTypeRefs = undefined;
|
|
219
|
+
LookupUtilities.soundDefRefs = undefined;
|
|
220
|
+
LookupUtilities.terrainTextureRefs = undefined;
|
|
221
|
+
LookupUtilities.itemTextureRefs = undefined;
|
|
222
|
+
|
|
223
|
+
//# sourceMappingURL=../maps/app/LookupUtilities.js.map
|