@minecraft/creator-tools 0.10.0 → 0.10.1
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/app/IProjectItemData.js +1 -1
- package/app/Project.js +1 -1
- package/app/ProjectItemRelations.js +10 -0
- package/app/ProjectItemUtilities.js +7 -7
- package/cli/index.js +49 -43
- package/core/Constants.js +1 -1
- package/core/Utilities.js +16 -2
- package/data/forms/biome/biome_definition.form.json +56 -1
- package/data/forms/biome/biome_description.form.json +2 -1
- package/data/forms/biome/biome_json_file.form.json +57 -1
- package/data/forms/biome/biome_replacement.form.json +2 -1
- package/data/forms/biome/index.json +1 -1
- package/data/forms/biome/minecraft_capped_surface.form.json +7 -1
- package/data/forms/biome/minecraft_climate.form.json +2 -1
- package/data/forms/biome/minecraft_creature_spawn_probability.form.json +2 -1
- package/data/forms/biome/minecraft_frozen_ocean_surface.form.json +7 -1
- package/data/forms/biome/minecraft_mesa_surface.form.json +9 -1
- package/data/forms/biome/minecraft_mountain_parameters.form.json +5 -1
- package/data/forms/biome/minecraft_multinoise_generation_rules.form.json +2 -1
- package/data/forms/biome/minecraft_overworld_generation_rules.form.json +2 -1
- package/data/forms/biome/minecraft_overworld_height.form.json +2 -1
- package/data/forms/biome/minecraft_replace_biomes.form.json +2 -0
- package/data/forms/biome/minecraft_surface_material_adjustments.form.json +9 -1
- package/data/forms/biome/minecraft_surface_parameters.form.json +7 -1
- package/data/forms/biome/minecraft_swamp_surface.form.json +7 -1
- package/data/forms/biome/minecraft_tags.form.json +2 -1
- package/data/forms/block/minecraft_collision_box.form.json +42 -0
- package/data/forms/block/minecraft_destructible_by_explosion.form.json +74 -6
- package/data/forms/block/minecraft_destructible_by_mining.form.json +143 -0
- package/data/forms/block/minecraft_display_name.form.json +6 -0
- package/data/forms/block/minecraft_flammable.form.json +56 -2
- package/data/forms/block/minecraft_friction.form.json +12 -0
- package/data/forms/block/minecraft_geometry.form.json +42 -0
- package/data/forms/block/minecraft_liquid_detection.form.json +24 -0
- package/data/forms/block/minecraft_map_color.form.json +42 -0
- package/data/forms/block/minecraft_material_instances.form.json +140 -0
- package/data/forms/block/minecraft_selection_box.form.json +42 -0
- package/data/forms/client_biome/client_biome_definition.form.json +16 -1
- package/data/forms/client_biome/client_biome_description.form.json +2 -1
- package/data/forms/client_biome/client_biome_json_file.form.json +17 -1
- package/data/forms/client_biome/foliage_color_map.form.json +2 -1
- package/data/forms/client_biome/grass_color_map.form.json +2 -1
- package/data/forms/client_biome/minecraft_atmosphere_identifier.form.json +1 -0
- package/data/forms/client_biome/minecraft_biome_music.form.json +2 -1
- package/data/forms/client_biome/minecraft_color_grading_identifier.form.json +1 -0
- package/data/forms/client_biome/minecraft_dry_foliage_color.form.json +1 -0
- package/data/forms/client_biome/minecraft_fog_appearance.form.json +2 -1
- package/data/forms/client_biome/minecraft_foliage_appearance.form.json +2 -1
- package/data/forms/client_biome/minecraft_grass_appearance.form.json +2 -1
- package/data/forms/client_biome/minecraft_lighting_identifier.form.json +1 -0
- package/data/forms/client_biome/minecraft_sky_color.form.json +2 -1
- package/data/forms/client_biome/minecraft_water_appearance.form.json +2 -1
- package/data/forms/client_biome/minecraft_water_identifier.form.json +1 -0
- package/data/forms/client_block/block_culling.form.json +5 -1
- package/data/forms/client_item/index.json +1 -0
- package/data/forms/client_item/resource.form.json +33 -0
- package/data/forms/client_item/resource_animations.form.json +10 -0
- package/data/forms/client_item/resource_geometry.form.json +10 -0
- package/data/forms/client_item/resource_materials.form.json +9 -0
- package/data/forms/client_item/resource_textures.form.json +10 -0
- package/data/forms/config/commands.form.json +2 -1
- package/data/forms/entity/filter_test.form.json +2 -1
- package/data/forms/entity/minecraft_ageable.form.json +12 -0
- package/data/forms/entity/minecraft_annotation_open_door.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_avoid_mob_type.form.json +85 -0
- package/data/forms/entity/minecraft_behavior_explore_outskirts.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_float.form.json +8 -0
- package/data/forms/entity/minecraft_behavior_harvest_farm_block.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_hide.form.json +29 -0
- package/data/forms/entity/minecraft_behavior_inspect_bookshelf.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_look_at_player.form.json +10 -0
- package/data/forms/entity/minecraft_behavior_look_at_trading_player.form.json +14 -0
- package/data/forms/entity/minecraft_behavior_make_love.form.json +14 -0
- package/data/forms/entity/minecraft_behavior_mingle.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_move_indoors.form.json +22 -0
- package/data/forms/entity/minecraft_behavior_panic.form.json +9 -0
- package/data/forms/entity/minecraft_behavior_pickup_items.form.json +18 -0
- package/data/forms/entity/minecraft_behavior_random_stroll.form.json +15 -0
- package/data/forms/entity/minecraft_behavior_receive_love.form.json +14 -0
- package/data/forms/entity/minecraft_behavior_share_items.form.json +24 -60
- package/data/forms/entity/minecraft_behavior_sleep.form.json +6 -0
- package/data/forms/entity/minecraft_behavior_take_flower.form.json +14 -0
- package/data/forms/entity/minecraft_behavior_trade_interest.form.json +138 -0
- package/data/forms/entity/minecraft_behavior_trade_with_player.form.json +14 -0
- package/data/forms/entity/minecraft_behavior_work.form.json +6 -0
- package/data/forms/entity/minecraft_breathable.form.json +9 -0
- package/data/forms/entity/minecraft_can_climb.form.json +6 -0
- package/data/forms/entity/minecraft_collision_box.form.json +9 -0
- package/data/forms/entity/minecraft_damage_sensor.form.json +44 -0
- package/data/forms/entity/minecraft_economy_trade_table.form.json +214 -0
- package/data/forms/entity/minecraft_follow_range.form.json +14 -0
- package/data/forms/entity/minecraft_hide.form.json +6 -0
- package/data/forms/entity/minecraft_hurt_on_condition.form.json +19 -0
- package/data/forms/entity/minecraft_inventory.form.json +9 -0
- package/data/forms/entity/minecraft_is_baby.form.json +6 -0
- package/data/forms/entity/minecraft_jump_static.form.json +6 -0
- package/data/forms/entity/minecraft_movement.form.json +8 -0
- package/data/forms/entity/minecraft_movement_basic.form.json +6 -0
- package/data/forms/entity/minecraft_nameable.form.json +6 -0
- package/data/forms/entity/minecraft_navigation_walk.form.json +11 -0
- package/data/forms/entity/minecraft_persistent.form.json +6 -0
- package/data/forms/entity/minecraft_physics.form.json +6 -0
- package/data/forms/entity/minecraft_preferred_path.form.json +350 -0
- package/data/forms/entity/minecraft_pushable.form.json +9 -0
- package/data/forms/entity/minecraft_scale.form.json +8 -0
- package/data/forms/entity/minecraft_shareables.form.json +83 -0
- package/data/forms/entity/minecraft_skin_id.form.json +38 -0
- package/data/forms/entity/minecraft_transformation.form.json +16 -0
- package/data/forms/entity/minecraft_variant.form.json +86 -0
- package/data/forms/entityfilters/has_biome_tag.form.json +288 -0
- package/data/forms/entityfilters/has_component.form.json +60 -0
- package/data/forms/entityfilters/in_lava.form.json +11 -0
- package/data/forms/entityfilters/is_difficulty.form.json +16 -0
- package/data/forms/entityfilters/is_family.form.json +194 -0
- package/data/forms/entityfilters/is_mark_variant.form.json +50 -0
- package/data/forms/entityfilters/is_skin_id.form.json +50 -0
- package/data/forms/index.json +1 -1
- package/data/forms/item/80.form.json +53 -1
- package/data/forms/item/description.form.json +3 -1
- package/data/forms/item/menu_category.form.json +2 -1
- package/data/forms/item/minecraft_block_placer.form.json +1 -0
- package/data/forms/item/minecraft_digger.form.json +2 -0
- package/data/forms/item/minecraft_durability.form.json +1 -0
- package/data/forms/item/minecraft_durability_sensor.form.json +1 -0
- package/data/forms/item/minecraft_durability_sensor_durability_threshold.form.json +2 -1
- package/data/forms/item/minecraft_entity_placer.form.json +2 -0
- package/data/forms/item/minecraft_fuel.form.json +10 -4
- package/data/forms/item/minecraft_icon.form.json +15 -67
- package/data/forms/item/minecraft_max_stack_size.form.json +1 -1
- package/data/forms/item/minecraft_projectile.form.json +27 -27
- package/data/forms/item/minecraft_repairable.form.json +2 -0
- package/data/forms/item/minecraft_shooter.form.json +38 -34
- package/data/forms/item/minecraft_use_duration.form.json +1 -0
- package/data/forms/item/minecraft_wearable.form.json +20 -19
- package/data/forms/misc/biome_replacement.form.json +2 -1
- package/data/forms/misc/bounds.form.json +2 -1
- package/data/forms/misc/class_v1_21_80_jigsawblockmetadata.form.json +2 -1
- package/data/forms/misc/crafting_catalog_category.form.json +6 -1
- package/data/forms/misc/crafting_catalog_document.form.json +7 -1
- package/data/forms/misc/crafting_catalog_group.form.json +5 -1
- package/data/forms/misc/crafting_catalog_group_icon.form.json +3 -1
- package/data/forms/misc/description.form.json +2 -1
- package/data/forms/misc/dimension.form.json +6 -1
- package/data/forms/misc/dimensiondocument.form.json +7 -1
- package/data/forms/misc/emitter_initialization.form.json +4 -1
- package/data/forms/misc/emitter_lifetime_events_proxy.form.json +8 -1
- package/data/forms/misc/emitter_lifetime_events_travel_distance_events.form.json +3 -1
- package/data/forms/misc/emitter_lifetime_expression.form.json +4 -1
- package/data/forms/misc/emitter_lifetime_looping.form.json +4 -1
- package/data/forms/misc/emitter_lifetime_once.form.json +3 -1
- package/data/forms/misc/emitter_local_space_proxy.form.json +2 -1
- package/data/forms/misc/emitter_rate_instant.form.json +3 -1
- package/data/forms/misc/emitter_rate_manual.form.json +3 -1
- package/data/forms/misc/emitter_rate_steady.form.json +4 -1
- package/data/forms/misc/emitter_shape_box.form.json +5 -1
- package/data/forms/misc/emitter_shape_custom.form.json +4 -1
- package/data/forms/misc/emitter_shape_disc.form.json +6 -1
- package/data/forms/misc/emitter_shape_entity_aabb.form.json +3 -1
- package/data/forms/misc/emitter_shape_point.form.json +4 -1
- package/data/forms/misc/emitter_shape_sphere.form.json +5 -1
- package/data/forms/misc/generation.form.json +2 -1
- package/data/forms/misc/minecraft_aim_assist_categories.form.json +5 -1
- package/data/forms/misc/minecraft_aim_assist_preset.form.json +3 -1
- package/data/forms/misc/minecraft_jigsaw_structure_metadata.form.json +3 -1
- package/data/forms/misc/particle_appearance_billboard.form.json +3 -1
- package/data/forms/misc/particle_appearance_billboard_flipbook_data.form.json +4 -1
- package/data/forms/misc/particle_appearance_tinting.form.json +6 -1
- package/data/forms/misc/particle_curve_bezier_chain.form.json +3 -1
- package/data/forms/misc/particle_curve_bezier_chain_node_proxy.form.json +2 -1
- package/data/forms/misc/particle_curve_linear.form.json +5 -1
- package/data/forms/misc/particle_effect.form.json +105 -1
- package/data/forms/misc/particle_effect_basic_render_parameters.form.json +2 -1
- package/data/forms/misc/particle_effect_component.form.json +71 -1
- package/data/forms/misc/particle_effect_description.form.json +3 -1
- package/data/forms/misc/particle_event_node.form.json +26 -1
- package/data/forms/misc/particle_event_random_node.form.json +26 -1
- package/data/forms/misc/particle_initial_spin.form.json +4 -1
- package/data/forms/misc/particle_initialization.form.json +4 -1
- package/data/forms/misc/particle_lifetime_expression.form.json +4 -1
- package/data/forms/misc/particle_motion_collision.form.json +5 -1
- package/data/forms/misc/particle_motion_collision_event.form.json +2 -1
- package/data/forms/misc/particle_motion_dynamic.form.json +6 -1
- package/data/forms/misc/particle_motion_parametric.form.json +5 -1
- package/data/forms/misc/particle_sound_effect_event.form.json +2 -1
- package/data/forms/misc/particle_visual_effect_event.form.json +3 -1
- package/data/forms/spawn/filter_test.form.json +2 -1
- package/data/forms/world/feature_rule_conditions.form.json +4 -1
- package/data/forms/world/feature_rule_definition.form.json +12 -1
- package/data/forms/world/feature_rule_description.form.json +2 -1
- package/data/forms/world/filter_test.form.json +2 -1
- package/data/forms/world/jigsawstructure.form.json +5 -1
- package/data/forms/world/scatter_params.form.json +7 -1
- package/data/mci/minecraft-samples-main.mci.json +1 -0
- package/data/mci/preview.mci.json +1 -0
- package/data/mci/release.mci.json +1 -1
- package/data/snippets/new-templates.json +23 -0
- package/docgen/FormJsonDocumentationGenerator.js +19 -1
- package/docgen/FormMarkdownDocumentationGenerator.js +4 -2
- package/info/StrictPlatformInfoGenerator.js +2 -2
- package/info/TypesInfoGenerator.js +2 -2
- package/integrations/BlockbenchModel.js +18 -1
- package/manager/FormatVersionManager.js +2 -2
- package/manager/ItemTypeManager.js +3 -3
- package/maps/app/IProjectItemData.js.map +1 -1
- package/maps/app/Project.js.map +1 -1
- package/maps/app/ProjectItemRelations.js.map +1 -1
- package/maps/app/ProjectItemUtilities.js.map +1 -1
- package/maps/cli/index.js.map +1 -1
- package/maps/core/Constants.js.map +1 -1
- package/maps/core/Utilities.js.map +1 -1
- package/maps/dataform/IField.js.map +1 -1
- package/maps/docgen/FormJsonDocumentationGenerator.js.map +1 -1
- package/maps/docgen/FormMarkdownDocumentationGenerator.js.map +1 -1
- package/maps/info/StrictPlatformInfoGenerator.js.map +1 -1
- package/maps/info/TypesInfoGenerator.js.map +1 -1
- package/maps/integrations/BlockbenchModel.js.map +1 -1
- package/maps/integrations/IBlockbenchModel.js.map +1 -1
- package/maps/manager/FormatVersionManager.js.map +1 -1
- package/maps/manager/ItemTypeManager.js.map +1 -1
- package/maps/minecraft/AttachableResourceDefinition.js.map +1 -1
- package/maps/minecraft/IModelGeometry.js.map +1 -1
- package/maps/minecraft/ItemTypeDefinition.js.map +1 -0
- package/maps/minecraft/MinecraftDefinitions.js.map +1 -1
- package/minecraft/AttachableResourceDefinition.js +26 -0
- package/minecraft/{ItemTypeBehaviorDefinition.js → ItemTypeDefinition.js} +70 -6
- package/minecraft/MinecraftDefinitions.js +2 -2
- package/package.json +1 -1
- package/data/forms/biome/minecraft_mountain_parameters_-_steep_material_adjustment_settings.form.json +0 -70
- package/data/forms/biome/minecraft_mountain_parameters_-_top_slide_settings.form.json +0 -12
- package/data/forms/biome/minecraft_surface_material_adjustments_-_surface_adjustment_materials_settings.form.json +0 -206
- package/data/forms/biome/minecraft_surface_material_adjustments_-_surface_adjustment_settings.form.json +0 -250
- package/maps/minecraft/ItemTypeBehaviorDefinition.js.map +0 -1
package/app/IProjectItemData.js
CHANGED
|
@@ -66,7 +66,7 @@ var ProjectItemType;
|
|
|
66
66
|
ProjectItemType[ProjectItemType["tradingBehaviorJson"] = 45] = "tradingBehaviorJson";
|
|
67
67
|
ProjectItemType[ProjectItemType["volumeBehaviorJson"] = 46] = "volumeBehaviorJson";
|
|
68
68
|
ProjectItemType[ProjectItemType["attachableResourceJson"] = 47] = "attachableResourceJson";
|
|
69
|
-
ProjectItemType[ProjectItemType["
|
|
69
|
+
ProjectItemType[ProjectItemType["itemTypeLegacyResource"] = 48] = "itemTypeLegacyResource";
|
|
70
70
|
ProjectItemType[ProjectItemType["materialsResourceJson"] = 49] = "materialsResourceJson";
|
|
71
71
|
ProjectItemType[ProjectItemType["musicDefinitionJson"] = 50] = "musicDefinitionJson";
|
|
72
72
|
ProjectItemType[ProjectItemType["soundDefinitionCatalog"] = 51] = "soundDefinitionCatalog";
|
package/app/Project.js
CHANGED
|
@@ -1815,7 +1815,7 @@ class Project {
|
|
|
1815
1815
|
newJsonType = IProjectItemData_1.ProjectItemType.textureSetJson;
|
|
1816
1816
|
}
|
|
1817
1817
|
else if (isResourcePack && folderPathLower.indexOf("/items/") >= 0) {
|
|
1818
|
-
newJsonType = IProjectItemData_1.ProjectItemType.
|
|
1818
|
+
newJsonType = IProjectItemData_1.ProjectItemType.itemTypeLegacyResource;
|
|
1819
1819
|
}
|
|
1820
1820
|
else if (isResourcePack && baseName === "sounds") {
|
|
1821
1821
|
newJsonType = IProjectItemData_1.ProjectItemType.soundCatalog;
|
|
@@ -5,6 +5,7 @@ const BlockTypeDefinition_1 = require("../minecraft/BlockTypeDefinition");
|
|
|
5
5
|
const EntityTypeDefinition_1 = require("../minecraft/EntityTypeDefinition");
|
|
6
6
|
const EntityTypeResourceDefinition_1 = require("../minecraft/EntityTypeResourceDefinition");
|
|
7
7
|
const ItemTextureCatalogDefinition_1 = require("../minecraft/ItemTextureCatalogDefinition");
|
|
8
|
+
const ItemTypeDefinition_1 = require("../minecraft/ItemTypeDefinition");
|
|
8
9
|
const JsonUIResourceDefinition_1 = require("../minecraft/JsonUIResourceDefinition");
|
|
9
10
|
const MusicDefinitionCatalogDefinition_1 = require("../minecraft/MusicDefinitionCatalogDefinition");
|
|
10
11
|
const ParticleEffectResourceDefinition_1 = require("../minecraft/ParticleEffectResourceDefinition");
|
|
@@ -30,6 +31,15 @@ class ProjectItemRelations {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
else if (item.itemType === IProjectItemData_1.ProjectItemType.itemTypeBehavior) {
|
|
35
|
+
await item.ensureStorage();
|
|
36
|
+
if (item.defaultFile) {
|
|
37
|
+
const itemTypeBehavior = await ItemTypeDefinition_1.default.ensureOnFile(item.defaultFile);
|
|
38
|
+
if (itemTypeBehavior) {
|
|
39
|
+
await itemTypeBehavior.addChildItems(project, item);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
33
43
|
else if (item.itemType === IProjectItemData_1.ProjectItemType.blockTypeBehavior) {
|
|
34
44
|
await item.ensureStorage();
|
|
35
45
|
if (item.defaultFile) {
|
|
@@ -130,7 +130,7 @@ class ProjectItemUtilities {
|
|
|
130
130
|
return "behavior/trading/trading.json";
|
|
131
131
|
case IProjectItemData_1.ProjectItemType.attachableResourceJson:
|
|
132
132
|
return "resource/attachables/attachables.json";
|
|
133
|
-
case IProjectItemData_1.ProjectItemType.
|
|
133
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
134
134
|
return "resource/items/items.json";
|
|
135
135
|
case IProjectItemData_1.ProjectItemType.materialsResourceJson:
|
|
136
136
|
return "resource/materials/materials.json";
|
|
@@ -339,7 +339,7 @@ class ProjectItemUtilities {
|
|
|
339
339
|
case IProjectItemData_1.ProjectItemType.dialogueBehaviorJson:
|
|
340
340
|
case IProjectItemData_1.ProjectItemType.MCWorld:
|
|
341
341
|
case IProjectItemData_1.ProjectItemType.worldTemplateManifestJson:
|
|
342
|
-
case IProjectItemData_1.ProjectItemType.
|
|
342
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
343
343
|
case IProjectItemData_1.ProjectItemType.featureBehavior:
|
|
344
344
|
case IProjectItemData_1.ProjectItemType.featureRuleBehaviorJson:
|
|
345
345
|
return IProjectItemData_1.ProjectItemCategory.types;
|
|
@@ -467,7 +467,7 @@ class ProjectItemUtilities {
|
|
|
467
467
|
case IProjectItemData_1.ProjectItemType.tradingBehaviorJson:
|
|
468
468
|
case IProjectItemData_1.ProjectItemType.volumeBehaviorJson:
|
|
469
469
|
case IProjectItemData_1.ProjectItemType.attachableResourceJson:
|
|
470
|
-
case IProjectItemData_1.ProjectItemType.
|
|
470
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
471
471
|
case IProjectItemData_1.ProjectItemType.materialsResourceJson:
|
|
472
472
|
case IProjectItemData_1.ProjectItemType.musicDefinitionJson:
|
|
473
473
|
case IProjectItemData_1.ProjectItemType.soundDefinitionCatalog:
|
|
@@ -683,7 +683,7 @@ class ProjectItemUtilities {
|
|
|
683
683
|
return "Volume";
|
|
684
684
|
case IProjectItemData_1.ProjectItemType.attachableResourceJson:
|
|
685
685
|
return "Attachable";
|
|
686
|
-
case IProjectItemData_1.ProjectItemType.
|
|
686
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
687
687
|
return "Item type resources";
|
|
688
688
|
case IProjectItemData_1.ProjectItemType.materialsResourceJson:
|
|
689
689
|
return "Materials";
|
|
@@ -895,7 +895,7 @@ class ProjectItemUtilities {
|
|
|
895
895
|
return (type === IProjectItemData_1.ProjectItemType.itemTextureJson ||
|
|
896
896
|
type === IProjectItemData_1.ProjectItemType.itemTypeBehavior ||
|
|
897
897
|
type === IProjectItemData_1.ProjectItemType.attachableResourceJson ||
|
|
898
|
-
type === IProjectItemData_1.ProjectItemType.
|
|
898
|
+
type === IProjectItemData_1.ProjectItemType.itemTypeLegacyResource);
|
|
899
899
|
}
|
|
900
900
|
static isItemRelated(projectItem, dontGoUpward, dontGoDownward) {
|
|
901
901
|
if (projectItem.parentItems && !dontGoUpward) {
|
|
@@ -1027,7 +1027,7 @@ class ProjectItemUtilities {
|
|
|
1027
1027
|
return "TypeScript files";
|
|
1028
1028
|
case IProjectItemData_1.ProjectItemType.js:
|
|
1029
1029
|
return "JavaScript files";
|
|
1030
|
-
case IProjectItemData_1.ProjectItemType.
|
|
1030
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
1031
1031
|
return "Item type visuals and audio";
|
|
1032
1032
|
case IProjectItemData_1.ProjectItemType.entityTypeResource:
|
|
1033
1033
|
return "Entity type visuals/audio";
|
|
@@ -1137,7 +1137,7 @@ class ProjectItemUtilities {
|
|
|
1137
1137
|
case IProjectItemData_1.ProjectItemType.entityTypeBehavior:
|
|
1138
1138
|
return ["entities"];
|
|
1139
1139
|
case IProjectItemData_1.ProjectItemType.itemTypeBehavior:
|
|
1140
|
-
case IProjectItemData_1.ProjectItemType.
|
|
1140
|
+
case IProjectItemData_1.ProjectItemType.itemTypeLegacyResource:
|
|
1141
1141
|
return ["items"];
|
|
1142
1142
|
case IProjectItemData_1.ProjectItemType.blockTypeBehavior:
|
|
1143
1143
|
return ["blocks"];
|
package/cli/index.js
CHANGED
|
@@ -834,50 +834,52 @@ async function validate() {
|
|
|
834
834
|
for (let i = 0; i < projectStarts.length; i++) {
|
|
835
835
|
const ps = projectStarts[i];
|
|
836
836
|
pool.queue(async (doTask) => {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
if (
|
|
854
|
-
if (
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
}
|
|
858
|
-
else {
|
|
859
|
-
for (const metaState of result) {
|
|
860
|
-
// clear out icons since the aggregation won't need them, and it should save memory.
|
|
861
|
-
if (metaState.infoSetData && metaState.infoSetData.info && metaState.infoSetData.info["defaultIcon"]) {
|
|
862
|
-
metaState.infoSetData.info["defaultIcon"] = undefined;
|
|
837
|
+
try {
|
|
838
|
+
const result = await doTask({
|
|
839
|
+
task: ClUtils_js_1.TaskType.validate,
|
|
840
|
+
project: ps,
|
|
841
|
+
arguments: {
|
|
842
|
+
suite: suiteConst,
|
|
843
|
+
exclusionList: exclusionListConst,
|
|
844
|
+
outputMci: aggregateReportsAfterValidationConst || outputType === ClUtils_js_1.OutputType.noReports ? true : false,
|
|
845
|
+
outputType: outputType,
|
|
846
|
+
},
|
|
847
|
+
outputFolder: options.outputFolder,
|
|
848
|
+
inputFolder: options.inputFolder,
|
|
849
|
+
displayInfo: localEnvConst.displayInfo,
|
|
850
|
+
displayVerbose: localEnvConst.displayVerbose,
|
|
851
|
+
force: force,
|
|
852
|
+
});
|
|
853
|
+
if (result !== undefined) {
|
|
854
|
+
if (typeof result === "string") {
|
|
855
|
+
if (ps) {
|
|
856
|
+
Log_js_1.default.error(ps.ctorProjectName + " error: " + result);
|
|
863
857
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
if (
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
for (const metaState of result) {
|
|
861
|
+
// clear out icons since the aggregation won't need them, and it should save memory.
|
|
862
|
+
if (metaState.infoSetData && metaState.infoSetData.info && metaState.infoSetData.info["defaultIcon"]) {
|
|
863
|
+
metaState.infoSetData.info["defaultIcon"] = undefined;
|
|
864
|
+
}
|
|
865
|
+
projectList.push(metaState);
|
|
866
|
+
const infoSet = metaState.infoSetData;
|
|
867
|
+
if (infoSet) {
|
|
868
|
+
const items = infoSet.items;
|
|
869
|
+
if (items) {
|
|
870
|
+
for (const item of items) {
|
|
871
|
+
if (item.iTp === IInfoItemData_js_1.InfoItemType.internalProcessingError) {
|
|
872
|
+
console.error("Internal Processing Error: " + ProjectInfoSet_js_1.default.getEffectiveMessageFromData(infoSet, item));
|
|
873
|
+
setErrorLevel(ERROR_VALIDATION_INTERNALPROCESSINGERROR);
|
|
874
|
+
}
|
|
875
|
+
else if (item.iTp === IInfoItemData_js_1.InfoItemType.testCompleteFail && !options.outputFolder) {
|
|
876
|
+
console.error("Test Fail: " + ProjectInfoSet_js_1.default.getEffectiveMessageFromData(infoSet, item));
|
|
877
|
+
setErrorLevel(ERROR_VALIDATION_TESTFAIL);
|
|
878
|
+
}
|
|
879
|
+
else if (item.iTp === IInfoItemData_js_1.InfoItemType.error && !options.outputFolder) {
|
|
880
|
+
console.error("Error: " + ProjectInfoSet_js_1.default.getEffectiveMessageFromData(infoSet, item));
|
|
881
|
+
setErrorLevel(ERROR_VALIDATION_ERROR);
|
|
882
|
+
}
|
|
881
883
|
}
|
|
882
884
|
}
|
|
883
885
|
}
|
|
@@ -885,6 +887,10 @@ async function validate() {
|
|
|
885
887
|
}
|
|
886
888
|
}
|
|
887
889
|
}
|
|
890
|
+
catch (e) {
|
|
891
|
+
console.error("Internal Processing Error 2: " + e.toString());
|
|
892
|
+
setErrorLevel(ERROR_VALIDATION_INTERNALPROCESSINGERROR);
|
|
893
|
+
}
|
|
888
894
|
});
|
|
889
895
|
}
|
|
890
896
|
await pool.settled();
|
package/core/Constants.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constants = void 0;
|
|
4
4
|
exports.constants = {
|
|
5
|
-
version: "0.10.
|
|
5
|
+
version: "0.10.1",
|
|
6
6
|
name: "Minecraft Creator Tools",
|
|
7
7
|
disclaimer: "Alpha software. License at https://github.com/mojang/minecraft-creator-tools.",
|
|
8
8
|
copyright: "Copyright 2024 Mojang AB. All rights reserved.",
|
package/core/Utilities.js
CHANGED
|
@@ -235,14 +235,28 @@ class Utilities {
|
|
|
235
235
|
return Utilities.dehumanifyMinecraftName(val);
|
|
236
236
|
}
|
|
237
237
|
static humanify(val, humanify) {
|
|
238
|
-
if (
|
|
238
|
+
if (humanify === IField_1.FieldValueHumanify.none || val === undefined) {
|
|
239
239
|
return val;
|
|
240
240
|
}
|
|
241
241
|
if (humanify === IField_1.FieldValueHumanify.general) {
|
|
242
242
|
return Utilities.humanifyObject(val);
|
|
243
243
|
}
|
|
244
244
|
if (typeof val === "object") {
|
|
245
|
-
|
|
245
|
+
let simpleStr = "";
|
|
246
|
+
for (const key in val) {
|
|
247
|
+
const data = val[key];
|
|
248
|
+
if (data !== undefined) {
|
|
249
|
+
// if the object looks complicated, just stringify it
|
|
250
|
+
if (typeof data === "object") {
|
|
251
|
+
return JSON.stringify(val);
|
|
252
|
+
}
|
|
253
|
+
if (simpleStr.length > 0) {
|
|
254
|
+
simpleStr += ", ";
|
|
255
|
+
}
|
|
256
|
+
simpleStr += key + ": " + data.toString();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return simpleStr;
|
|
246
260
|
}
|
|
247
261
|
if (Array.isArray(val)) {
|
|
248
262
|
return val;
|