@minecraft/creator-tools 0.9.0 → 0.9.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/NOTICE.md +22 -0
- package/app/IProjectItemData.js +9 -1
- package/app/Project.js +38 -1
- package/app/ProjectExporter.js +32 -5
- package/app/ProjectItem.js +2 -0
- package/app/ProjectItemUtilities.js +86 -13
- package/app/ProjectUtilities.js +25 -1
- package/cli/TaskWorker.js +12 -2
- package/core/Constants.js +1 -1
- package/core/ContentIndex.js +3 -0
- package/core/Utilities.js +94 -0
- package/data/forms/biome/biome_json_file.form.json +1361 -172
- package/data/forms/biome/minecraft_capped_surface.form.json +182 -20
- package/data/forms/biome/minecraft_climate.form.json +3 -1
- package/data/forms/biome/minecraft_creature_spawn_probability.form.json +7 -1
- package/data/forms/biome/minecraft_frozen_ocean_surface.form.json +180 -30
- package/data/forms/biome/minecraft_mesa_surface.form.json +252 -42
- package/data/forms/biome/minecraft_mountain_parameters.form.json +85 -2
- package/data/forms/biome/minecraft_overworld_generation_rules.form.json +32 -13
- package/data/forms/biome/minecraft_overworld_height.form.json +3 -1
- package/data/forms/biome/minecraft_surface_material_adjustments.form.json +256 -1
- package/data/forms/biome/minecraft_surface_parameters.form.json +180 -30
- package/data/forms/biome/minecraft_swamp_surface.form.json +180 -30
- package/data/forms/biome/minecraft_tags.form.json +1 -1
- package/data/forms/block/minecraft_bone_visibility.form.json +2 -1
- package/data/forms/block/minecraft_breathability.form.json +2 -1
- package/data/forms/block/minecraft_collision_box.form.json +14 -1
- package/data/forms/block/minecraft_crafting_table.form.json +35 -3
- package/data/forms/block/minecraft_custom_components.form.json +27 -2
- package/data/forms/block/minecraft_destructible_by_explosion.form.json +30 -7
- package/data/forms/block/minecraft_destructible_by_mining.form.json +44 -6
- package/data/forms/block/minecraft_destruction_particles.form.json +3 -4
- package/data/forms/block/minecraft_display_name.form.json +10 -1
- package/data/forms/block/minecraft_flammable.form.json +15 -5
- package/data/forms/block/minecraft_friction.form.json +2 -1
- package/data/forms/block/minecraft_geometry.form.json +67 -0
- package/data/forms/block/minecraft_item_visual.form.json +41 -3
- package/data/forms/block/minecraft_light_dampening.form.json +2 -1
- package/data/forms/block/minecraft_light_emission.form.json +16 -1
- package/data/forms/block/minecraft_liquid_detection.form.json +67 -1
- package/data/forms/block/minecraft_loot.form.json +14 -1
- package/data/forms/block/minecraft_map_color.form.json +14 -1
- package/data/forms/block/minecraft_material_instances.form.json +119 -20
- package/data/forms/block/minecraft_placement_filter.form.json +2 -1
- package/data/forms/block/minecraft_queued_ticking.form.json +2 -1
- package/data/forms/block/minecraft_random_ticking.form.json +2 -1
- package/data/forms/block/minecraft_redstone_conductivity.form.json +2 -1
- package/data/forms/block/minecraft_replaceable.form.json +2 -1
- package/data/forms/block/minecraft_selection_box.form.json +14 -1
- package/data/forms/block/minecraft_transformation.form.json +2 -1
- package/data/forms/block/minecraft_unit_cube.form.json +2 -1
- package/data/forms/camera/index.json +1 -1
- package/data/forms/camera/v1_21_70_camerapresetfile.form.json +276 -0
- package/data/forms/{clientbiome → client_biome}/client_biome_description.form.json +1 -1
- package/data/forms/{clientbiome → client_biome}/client_biome_json_file.form.json +173 -53
- package/data/forms/client_biome/index.json +1 -0
- package/data/forms/client_biome/minecraft_atmosphere_identifier.form.json +13 -0
- package/data/forms/{clientbiome → client_biome}/minecraft_biome_music.form.json +6 -0
- package/data/forms/client_biome/minecraft_color_grading_identifier.form.json +13 -0
- package/data/forms/client_biome/minecraft_dry_foliage_color.form.json +21 -0
- package/data/forms/client_biome/minecraft_lighting_identifier.form.json +13 -0
- package/data/forms/{clientbiome → client_biome}/minecraft_sky_color.form.json +9 -1
- package/data/forms/{clientbiome → client_biome}/minecraft_water_appearance.form.json +9 -1
- package/data/forms/client_biome/minecraft_water_identifier.form.json +13 -0
- package/data/forms/client_block/index.json +1 -0
- package/data/forms/client_block/v1_20_60_blockculling.form.json +90 -0
- package/data/forms/client_client_block/index.json +1 -0
- package/data/forms/client_client_block/struct_sharedtypes_v1_20_60_blockculling_contents.form.json +30 -0
- package/data/forms/client_client_block/struct_sharedtypes_v1_20_60_blockculling_contents_description.form.json +12 -0
- package/data/forms/client_client_block/struct_sharedtypes_v1_20_60_blockculling_contents_rule.form.json +42 -0
- package/data/forms/client_client_block/struct_sharedtypes_v1_20_60_blockculling_contents_rule_geometrypart.form.json +24 -0
- package/data/forms/client_deferred_rendering/atmosphericscattering_atmosphericscatteringconfigsettings.form.json +234 -0
- package/data/forms/client_deferred_rendering/colorgraderconfig_colorgradingparameterssrc.form.json +790 -0
- package/data/forms/client_deferred_rendering/index.json +1 -0
- package/data/forms/client_deferred_rendering/lightinggroup_lightingimpl_1_21_70.form.json +258 -0
- package/data/forms/client_deferred_rendering/pbrfallbackconfig_pbrfallbackconfigsettings.form.json +232 -0
- package/data/forms/client_deferred_rendering/pointlightconfig_pointlightconfigsettings.form.json +38 -0
- package/data/forms/client_deferred_rendering/shadowstylizationconfig_shadowstylizationconfigsettings.form.json +46 -0
- package/data/forms/client_deferred_rendering/waterconfig_waterconfigsettingsv1.form.json +336 -0
- package/data/forms/clientbiome/index.json +1 -1
- package/data/forms/config/commands.form.json +1 -1
- package/data/forms/entity/index.json +1 -1
- package/data/forms/entity/minecraft_addrider.form.json +2 -1
- package/data/forms/entity/minecraft_admire_item.form.json +2 -1
- package/data/forms/entity/minecraft_ageable.form.json +91 -1
- package/data/forms/entity/minecraft_ambient_sound_interval.form.json +2 -1
- package/data/forms/entity/minecraft_anger_level.form.json +2 -1
- package/data/forms/entity/minecraft_angry.form.json +2 -1
- package/data/forms/entity/minecraft_annotation_break_door.form.json +65 -1
- package/data/forms/entity/minecraft_annotation_open_door.form.json +27 -0
- package/data/forms/entity/minecraft_area_attack.form.json +2 -1
- package/data/forms/entity/minecraft_attack.form.json +24 -1
- package/data/forms/entity/minecraft_attack_cooldown.form.json +3 -1
- package/data/forms/entity/minecraft_barter.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_admire_item.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_avoid_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_avoid_mob_type.form.json +28 -1
- package/data/forms/entity/minecraft_behavior_barter.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_beg.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_break_door.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_breed.form.json +38 -1
- package/data/forms/entity/minecraft_behavior_celebrate.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_celebrate_survive.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_charge_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_charge_held_item.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_circle_around_anchor.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_controlled_by_player.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_croak.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_defend_trusted_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_defend_village_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_delayed_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dig.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_door_interact.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonchargeplayer.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragondeath.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonflaming.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonholdingpattern.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonlanding.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonscanning.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragonstrafeplayer.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_dragontakeoff.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_drink_milk.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_drink_potion.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_drop_item_for.form.json +169 -1
- package/data/forms/entity/minecraft_behavior_eat_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_eat_carried_item.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_eat_mob.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_emerge.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_enderman_leave_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_enderman_take_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_equip_item.form.json +10 -1
- package/data/forms/entity/minecraft_behavior_explore_outskirts.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_fertilize_farm_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_find_cover.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_find_mount.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_find_underwater_treasure.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_fire_at_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_flee_sun.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_float.form.json +34 -1
- package/data/forms/entity/minecraft_behavior_float_tempt.form.json +75 -0
- package/data/forms/entity/minecraft_behavior_float_wander.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_follow_caravan.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_follow_mob.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_follow_owner.form.json +13 -1
- package/data/forms/entity/minecraft_behavior_follow_parent.form.json +29 -1
- package/data/forms/entity/minecraft_behavior_follow_target_captain.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_go_and_give_items_to_noteblock.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_go_and_give_items_to_owner.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_go_home.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_guardian_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_harvest_farm_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_hide.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_hold_ground.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_hurt_by_target.form.json +90 -1
- package/data/forms/entity/minecraft_behavior_inspect_bookshelf.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_investigate_suspicious_location.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_jump_around_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_jump_to_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_knockback_roar.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_lay_down.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_lay_egg.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_leap_at_target.form.json +11 -1
- package/data/forms/entity/minecraft_behavior_look_at_entity.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_look_at_player.form.json +50 -1
- package/data/forms/entity/minecraft_behavior_look_at_target.form.json +173 -4
- package/data/forms/entity/minecraft_behavior_look_at_trading_player.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_make_love.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_melee_attack.form.json +88 -6
- package/data/forms/entity/minecraft_behavior_melee_box_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_mingle.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_mount_pathing.form.json +57 -1
- package/data/forms/entity/minecraft_behavior_move_around_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_indoors.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_outdoors.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_through_village.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_land.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_lava.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_liquid.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_poi.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_random_block.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_village.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_to_water.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_towards_dwelling_restriction.form.json +16 -1
- package/data/forms/entity/minecraft_behavior_move_towards_home_restriction.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_move_towards_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_nap.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_nearest_attackable_target.form.json +273 -1
- package/data/forms/entity/minecraft_behavior_nearest_prioritized_attackable_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_ocelot_sit_on_block.form.json +17 -1
- package/data/forms/entity/minecraft_behavior_ocelotattack.form.json +20 -1
- package/data/forms/entity/minecraft_behavior_offer_flower.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_open_door.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_owner_hurt_by_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_owner_hurt_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_panic.form.json +44 -1
- package/data/forms/entity/minecraft_behavior_pet_sleep_with_owner.form.json +44 -1
- package/data/forms/entity/minecraft_behavior_pickup_items.form.json +15 -1
- package/data/forms/entity/minecraft_behavior_play.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_play_dead.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_player_ride_tamed.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_raid_garden.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_ram_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_breach.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_fly.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_hover.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_look_around.form.json +82 -1
- package/data/forms/entity/minecraft_behavior_random_look_around_and_sit.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_search_and_dig.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_sitting.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_random_stroll.form.json +62 -1
- package/data/forms/entity/minecraft_behavior_random_swim.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_ranged_attack.form.json +163 -4
- package/data/forms/entity/minecraft_behavior_receive_love.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_restrict_open_door.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_restrict_sun.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_rise_to_liquid_level.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_roar.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_roll.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_run_around_like_crazy.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_scared.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_send_event.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_share_items.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_silverfish_merge_with_stone.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_silverfish_wake_up_friends.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_skeleton_horse_trap.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_sleep.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_slime_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_slime_float.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_slime_keep_on_jumping.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_slime_random_direction.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_snacking.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_sneeze.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_sniff.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_sonic_boom.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_squid_dive.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_squid_flee.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_squid_idle.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_squid_move_away_from_ground.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_squid_out_of_water.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_stalk_and_pounce_on_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_stay_near_noteblock.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_stay_while_sitting.form.json +10 -1
- package/data/forms/entity/minecraft_behavior_stomp_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_stomp_turtle_egg.form.json +15 -1
- package/data/forms/entity/minecraft_behavior_stroll_towards_village.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_summon_entity.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swell.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swim_idle.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swim_up_for_breath.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swim_wander.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swim_with_entity.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_swoop_attack.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_take_flower.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_teleport_to_owner.form.json +22 -1
- package/data/forms/entity/minecraft_behavior_tempt.form.json +158 -5
- package/data/forms/entity/minecraft_behavior_timer_flag_1.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_timer_flag_2.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_timer_flag_3.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_trade_interest.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_trade_with_player.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_vex_copy_owner_target.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_vex_random_move.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_wither_random_attack_pos_goal.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_wither_target_highest_damage.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_work.form.json +2 -1
- package/data/forms/entity/minecraft_behavior_work_composter.form.json +2 -1
- package/data/forms/entity/minecraft_block_climber.form.json +2 -1
- package/data/forms/entity/minecraft_block_sensor.form.json +2 -1
- package/data/forms/entity/minecraft_body_rotation_axis_aligned.form.json +2 -1
- package/data/forms/entity/minecraft_body_rotation_blocked.form.json +44 -1
- package/data/forms/entity/minecraft_boostable.form.json +2 -1
- package/data/forms/entity/minecraft_boss.form.json +2 -1
- package/data/forms/entity/minecraft_break_blocks.form.json +2 -1
- package/data/forms/entity/minecraft_breathable.form.json +112 -1
- package/data/forms/entity/minecraft_breedable.form.json +116 -1
- package/data/forms/entity/minecraft_bribeable.form.json +2 -1
- package/data/forms/entity/minecraft_buoyant.form.json +2 -1
- package/data/forms/entity/minecraft_burns_in_daylight.form.json +2 -1
- package/data/forms/entity/minecraft_can_climb.form.json +32 -1
- package/data/forms/entity/minecraft_can_fly.form.json +2 -1
- package/data/forms/entity/minecraft_can_join_raid.form.json +2 -1
- package/data/forms/entity/minecraft_can_power_jump.form.json +2 -1
- package/data/forms/entity/minecraft_cannot_be_attacked.form.json +2 -1
- package/data/forms/entity/minecraft_celebrate_hunt.form.json +2 -1
- package/data/forms/entity/minecraft_collision_box.form.json +83 -37
- package/data/forms/entity/minecraft_color.form.json +10 -1
- package/data/forms/entity/minecraft_color2.form.json +2 -1
- package/data/forms/entity/minecraft_combat_regeneration.form.json +2 -1
- package/data/forms/entity/minecraft_conditional_bandwidth_optimization.form.json +122 -1
- package/data/forms/entity/minecraft_custom_hit_test.form.json +2 -1
- package/data/forms/entity/minecraft_damage_over_time.form.json +2 -1
- package/data/forms/entity/minecraft_damage_sensor.form.json +75 -1
- package/data/forms/entity/minecraft_dash.form.json +2 -1
- package/data/forms/entity/minecraft_default_look_angle.form.json +2 -1
- package/data/forms/entity/minecraft_despawn.form.json +42 -1
- package/data/forms/entity/minecraft_dimension_bound.form.json +2 -1
- package/data/forms/entity/minecraft_drying_out_timer.form.json +2 -1
- package/data/forms/entity/minecraft_economy_trade_table.form.json +2 -1
- package/data/forms/entity/minecraft_entity_armor_equipment_slot_mapping.form.json +2 -1
- package/data/forms/entity/minecraft_entity_sensor.form.json +2 -1
- package/data/forms/entity/minecraft_environment_sensor.form.json +2 -1
- package/data/forms/entity/minecraft_equip_item.form.json +8 -1
- package/data/forms/entity/minecraft_equipment.form.json +10 -1
- package/data/forms/entity/minecraft_equippable.form.json +2 -1
- package/data/forms/entity/minecraft_exhaustion_values.form.json +2 -1
- package/data/forms/entity/minecraft_experience_reward.form.json +108 -1
- package/data/forms/entity/minecraft_explode.form.json +2 -1
- package/data/forms/entity/minecraft_fire_immune.form.json +2 -1
- package/data/forms/entity/minecraft_floats_in_liquid.form.json +2 -1
- package/data/forms/entity/minecraft_flocking.form.json +2 -1
- package/data/forms/entity/minecraft_flying_speed.form.json +2 -1
- package/data/forms/entity/minecraft_follow_range.form.json +423 -0
- package/data/forms/entity/minecraft_friction_modifier.form.json +2 -1
- package/data/forms/entity/minecraft_game_event_movement_tracking.form.json +26 -1
- package/data/forms/entity/minecraft_genetics.form.json +5 -3
- package/data/forms/entity/minecraft_giveable.form.json +2 -1
- package/data/forms/entity/minecraft_ground_offset.form.json +2 -1
- package/data/forms/entity/minecraft_group_size.form.json +2 -1
- package/data/forms/entity/minecraft_grows_crop.form.json +2 -1
- package/data/forms/entity/minecraft_healable.form.json +19 -1
- package/data/forms/entity/minecraft_heartbeat.form.json +2 -1
- package/data/forms/entity/minecraft_home.form.json +2 -1
- package/data/forms/entity/minecraft_horse_jump_strength.form.json +118 -0
- package/data/forms/entity/minecraft_hurt_on_condition.form.json +249 -1
- package/data/forms/entity/minecraft_ignore_cannot_be_attacked.form.json +2 -1
- package/data/forms/entity/minecraft_input_air_controlled.form.json +2 -1
- package/data/forms/entity/minecraft_input_ground_controlled.form.json +2 -1
- package/data/forms/entity/minecraft_inside_block_notifier.form.json +2 -1
- package/data/forms/entity/minecraft_insomnia.form.json +2 -1
- package/data/forms/entity/minecraft_instant_despawn.form.json +2 -1
- package/data/forms/entity/minecraft_interact.form.json +932 -1
- package/data/forms/entity/minecraft_inventory.form.json +2 -1
- package/data/forms/entity/minecraft_is_baby.form.json +26 -1
- package/data/forms/entity/minecraft_is_charged.form.json +2 -1
- package/data/forms/entity/minecraft_is_chested.form.json +2 -1
- package/data/forms/entity/minecraft_is_collidable.form.json +2 -1
- package/data/forms/entity/minecraft_is_dyeable.form.json +10 -1
- package/data/forms/entity/minecraft_is_hidden_when_invisible.form.json +26 -1
- package/data/forms/entity/minecraft_is_ignited.form.json +2 -1
- package/data/forms/entity/minecraft_is_illager_captain.form.json +2 -1
- package/data/forms/entity/minecraft_is_pregnant.form.json +2 -1
- package/data/forms/entity/minecraft_is_saddled.form.json +2 -1
- package/data/forms/entity/minecraft_is_shaking.form.json +8 -1
- package/data/forms/entity/minecraft_is_sheared.form.json +2 -1
- package/data/forms/entity/minecraft_is_stackable.form.json +2 -1
- package/data/forms/entity/minecraft_is_stunned.form.json +2 -1
- package/data/forms/entity/minecraft_is_tamed.form.json +8 -1
- package/data/forms/entity/minecraft_item_controllable.form.json +2 -1
- package/data/forms/entity/minecraft_item_hopper.form.json +2 -1
- package/data/forms/entity/minecraft_jump_dynamic.form.json +2 -1
- package/data/forms/entity/minecraft_jump_static.form.json +38 -1
- package/data/forms/entity/minecraft_knockback_resistance.form.json +230 -0
- package/data/forms/entity/minecraft_lava_movement.form.json +31 -0
- package/data/forms/entity/minecraft_leashable.form.json +80 -2
- package/data/forms/entity/minecraft_looked_at.form.json +2 -1
- package/data/forms/entity/minecraft_loot.form.json +158 -1
- package/data/forms/entity/minecraft_managed_wandering_trader.form.json +2 -1
- package/data/forms/entity/minecraft_mark_variant.form.json +2 -1
- package/data/forms/entity/minecraft_mob_effect.form.json +2 -1
- package/data/forms/entity/minecraft_mob_effect_immunity.form.json +2 -1
- package/data/forms/entity/minecraft_movement_amphibious.form.json +2 -1
- package/data/forms/entity/minecraft_movement_basic.form.json +80 -1
- package/data/forms/entity/minecraft_movement_fly.form.json +2 -1
- package/data/forms/entity/minecraft_movement_generic.form.json +2 -1
- package/data/forms/entity/minecraft_movement_hover.form.json +2 -1
- package/data/forms/entity/minecraft_movement_jump.form.json +2 -1
- package/data/forms/entity/minecraft_movement_skip.form.json +2 -1
- package/data/forms/entity/minecraft_movement_sound_distance_offset.form.json +2 -1
- package/data/forms/entity/minecraft_movement_sway.form.json +2 -1
- package/data/forms/entity/minecraft_nameable.form.json +86 -1
- package/data/forms/entity/minecraft_navigation_climb.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_float.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_fly.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_generic.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_hover.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_swim.form.json +2 -1
- package/data/forms/entity/minecraft_navigation_walk.form.json +100 -1
- package/data/forms/entity/minecraft_on_death.form.json +2 -1
- package/data/forms/entity/minecraft_on_friendly_anger.form.json +2 -1
- package/data/forms/entity/minecraft_on_hurt.form.json +2 -1
- package/data/forms/entity/minecraft_on_hurt_by_player.form.json +2 -1
- package/data/forms/entity/minecraft_on_ignite.form.json +2 -1
- package/data/forms/entity/minecraft_on_start_landing.form.json +2 -1
- package/data/forms/entity/minecraft_on_start_takeoff.form.json +2 -1
- package/data/forms/entity/minecraft_on_target_acquired.form.json +2 -1
- package/data/forms/entity/minecraft_on_target_escape.form.json +2 -1
- package/data/forms/entity/minecraft_on_wake_with_owner.form.json +22 -0
- package/data/forms/entity/minecraft_out_of_control.form.json +2 -1
- package/data/forms/entity/minecraft_peek.form.json +2 -1
- package/data/forms/entity/minecraft_persistent.form.json +44 -1
- package/data/forms/entity/minecraft_physics.form.json +92 -1
- package/data/forms/entity/minecraft_player_exhaustion.form.json +38 -0
- package/data/forms/entity/minecraft_player_experience.form.json +40 -0
- package/data/forms/entity/minecraft_player_level.form.json +38 -0
- package/data/forms/entity/minecraft_player_saturation.form.json +46 -0
- package/data/forms/entity/minecraft_preferred_path.form.json +2 -1
- package/data/forms/entity/minecraft_projectile.form.json +2 -1
- package/data/forms/entity/minecraft_push_through.form.json +2 -1
- package/data/forms/entity/minecraft_pushable.form.json +56 -1
- package/data/forms/entity/minecraft_raid_trigger.form.json +2 -1
- package/data/forms/entity/minecraft_rail_movement.form.json +2 -1
- package/data/forms/entity/minecraft_rail_sensor.form.json +2 -1
- package/data/forms/entity/minecraft_ravager_blocked.form.json +2 -1
- package/data/forms/entity/minecraft_reflect_projectiles.form.json +2 -1
- package/data/forms/entity/minecraft_renders_when_invisible.form.json +2 -1
- package/data/forms/entity/minecraft_rideable.form.json +93 -1
- package/data/forms/entity/minecraft_scaffolding_climber.form.json +8 -0
- package/data/forms/entity/minecraft_scale.form.json +64 -1
- package/data/forms/entity/minecraft_scale_by_age.form.json +2 -1
- package/data/forms/entity/minecraft_scheduler.form.json +2 -1
- package/data/forms/entity/minecraft_shareables.form.json +215 -1
- package/data/forms/entity/minecraft_shooter.form.json +86 -1
- package/data/forms/entity/minecraft_sittable.form.json +8 -1
- package/data/forms/entity/minecraft_skin_id.form.json +2 -1
- package/data/forms/entity/minecraft_sound_volume.form.json +2 -1
- package/data/forms/entity/minecraft_spawn_entity.form.json +117 -1
- package/data/forms/entity/minecraft_spell_effects.form.json +2 -1
- package/data/forms/entity/minecraft_strength.form.json +2 -1
- package/data/forms/entity/minecraft_suspect_tracking.form.json +2 -1
- package/data/forms/entity/minecraft_tameable.form.json +27 -1
- package/data/forms/entity/minecraft_tamemount.form.json +2 -1
- package/data/forms/entity/minecraft_target_nearby_sensor.form.json +2 -1
- package/data/forms/entity/minecraft_teleport.form.json +2 -1
- package/data/forms/entity/minecraft_tick_world.form.json +2 -1
- package/data/forms/entity/minecraft_timer.form.json +22 -1
- package/data/forms/entity/minecraft_trade_table.form.json +2 -1
- package/data/forms/entity/minecraft_trail.form.json +2 -1
- package/data/forms/entity/minecraft_transformation.form.json +21 -1
- package/data/forms/entity/minecraft_transient.form.json +2 -1
- package/data/forms/entity/minecraft_trusting.form.json +2 -1
- package/data/forms/entity/minecraft_type_family.form.json +235 -1
- package/data/forms/entity/minecraft_underwater_movement.form.json +219 -0
- package/data/forms/entity/minecraft_variable_max_auto_step.form.json +2 -1
- package/data/forms/entity/minecraft_variant.form.json +90 -1
- package/data/forms/entity/minecraft_vibration_damper.form.json +2 -1
- package/data/forms/entity/minecraft_vibration_listener.form.json +19 -0
- package/data/forms/entity/minecraft_walk_animation_speed.form.json +2 -1
- package/data/forms/entity/minecraft_wants_jockey.form.json +2 -1
- package/data/forms/entity/minecraft_water_movement.form.json +2 -1
- package/data/forms/entityevents/add_component_group.form.json +2 -1
- package/data/forms/entityevents/index.json +1 -1
- package/data/forms/entityevents/overview.form.json +2 -1
- package/data/forms/entityevents/queue_command.form.json +2 -1
- package/data/forms/entityevents/randomize_node.form.json +2 -1
- package/data/forms/entityevents/remove_component_group.form.json +2 -1
- package/data/forms/entityevents/sequence_node.form.json +2 -1
- package/data/forms/entityevents/set_entity_property.form.json +2 -1
- package/data/forms/entityevents/{this_describes_the_structure_of_the_events_section_.form.json → this_describes_the_structure_of_the_events_section.form.json} +1 -0
- package/data/forms/entityevents/trigger.form.json +2 -1
- package/data/forms/entityevents/versioned_changes.form.json +2 -1
- package/data/forms/entityfilters/actor_health.form.json +2 -1
- package/data/forms/entityfilters/all_slots_empty.form.json +2 -1
- package/data/forms/entityfilters/any_slot_empty.form.json +2 -1
- package/data/forms/entityfilters/bool_property.form.json +2 -1
- package/data/forms/entityfilters/clock_time.form.json +2 -1
- package/data/forms/entityfilters/distance_to_nearest_player.form.json +2 -1
- package/data/forms/entityfilters/enum_property.form.json +3 -2
- package/data/forms/entityfilters/float_property.form.json +2 -1
- package/data/forms/entityfilters/has_ability.form.json +2 -1
- package/data/forms/entityfilters/has_biome_tag.form.json +2 -1
- package/data/forms/entityfilters/has_component.form.json +12 -1
- package/data/forms/entityfilters/has_container_open.form.json +2 -1
- package/data/forms/entityfilters/has_damage.form.json +2 -1
- package/data/forms/entityfilters/has_damaged_equipment.form.json +2 -1
- package/data/forms/entityfilters/has_equipment.form.json +2 -1
- package/data/forms/entityfilters/has_mob_effect.form.json +2 -1
- package/data/forms/entityfilters/has_nametag.form.json +2 -1
- package/data/forms/entityfilters/has_property.form.json +2 -1
- package/data/forms/entityfilters/has_ranged_weapon.form.json +2 -1
- package/data/forms/entityfilters/has_silk_touch.form.json +2 -1
- package/data/forms/entityfilters/has_tag.form.json +2 -1
- package/data/forms/entityfilters/has_target.form.json +2 -1
- package/data/forms/entityfilters/has_trade_supply.form.json +2 -1
- package/data/forms/entityfilters/home_distance.form.json +2 -1
- package/data/forms/entityfilters/hourly_clock_time.form.json +2 -1
- package/data/forms/entityfilters/in_block.form.json +2 -1
- package/data/forms/entityfilters/in_caravan.form.json +2 -1
- package/data/forms/entityfilters/in_clouds.form.json +2 -1
- package/data/forms/entityfilters/in_contact_with_water.form.json +2 -1
- package/data/forms/entityfilters/in_lava.form.json +145 -1
- package/data/forms/entityfilters/in_nether.form.json +2 -1
- package/data/forms/entityfilters/in_overworld.form.json +2 -1
- package/data/forms/entityfilters/in_water.form.json +2 -1
- package/data/forms/entityfilters/in_water_or_rain.form.json +2 -1
- package/data/forms/entityfilters/inactivity_timer.form.json +2 -1
- package/data/forms/entityfilters/int_property.form.json +2 -1
- package/data/forms/entityfilters/is_altitude.form.json +2 -1
- package/data/forms/entityfilters/is_avoiding_mobs.form.json +2 -1
- package/data/forms/entityfilters/is_baby.form.json +2 -1
- package/data/forms/entityfilters/is_biome.form.json +2 -1
- package/data/forms/entityfilters/is_block.form.json +2 -1
- package/data/forms/entityfilters/is_bound_to_creaking_heart.form.json +2 -1
- package/data/forms/entityfilters/is_brightness.form.json +2 -1
- package/data/forms/entityfilters/is_climbing.form.json +2 -1
- package/data/forms/entityfilters/is_color.form.json +2 -1
- package/data/forms/entityfilters/is_daytime.form.json +2 -1
- package/data/forms/entityfilters/is_difficulty.form.json +2 -1
- package/data/forms/entityfilters/is_family.form.json +264 -1
- package/data/forms/entityfilters/is_game_rule.form.json +2 -1
- package/data/forms/entityfilters/is_humid.form.json +2 -1
- package/data/forms/entityfilters/is_immobile.form.json +2 -1
- package/data/forms/entityfilters/is_in_village.form.json +2 -1
- package/data/forms/entityfilters/is_leashed.form.json +2 -1
- package/data/forms/entityfilters/is_leashed_to.form.json +2 -1
- package/data/forms/entityfilters/is_mark_variant.form.json +2 -1
- package/data/forms/entityfilters/is_missing_health.form.json +2 -1
- package/data/forms/entityfilters/is_moving.form.json +2 -1
- package/data/forms/entityfilters/is_navigating.form.json +2 -1
- package/data/forms/entityfilters/is_owner.form.json +2 -1
- package/data/forms/entityfilters/is_panicking.form.json +2 -1
- package/data/forms/entityfilters/is_persistent.form.json +2 -1
- package/data/forms/entityfilters/is_raider.form.json +2 -1
- package/data/forms/entityfilters/is_riding.form.json +2 -1
- package/data/forms/entityfilters/is_sitting.form.json +2 -1
- package/data/forms/entityfilters/is_skin_id.form.json +2 -1
- package/data/forms/entityfilters/is_sleeping.form.json +2 -1
- package/data/forms/entityfilters/is_sneak_held.form.json +2 -1
- package/data/forms/entityfilters/is_sneaking.form.json +2 -1
- package/data/forms/entityfilters/is_snow_covered.form.json +2 -1
- package/data/forms/entityfilters/is_sprinting.form.json +2 -1
- package/data/forms/entityfilters/is_target.form.json +2 -1
- package/data/forms/entityfilters/is_temperature_type.form.json +2 -1
- package/data/forms/entityfilters/is_temperature_value.form.json +2 -1
- package/data/forms/entityfilters/is_underground.form.json +2 -1
- package/data/forms/entityfilters/is_underwater.form.json +30 -1
- package/data/forms/entityfilters/is_variant.form.json +2 -1
- package/data/forms/entityfilters/is_visible.form.json +2 -1
- package/data/forms/entityfilters/is_waterlogged.form.json +2 -1
- package/data/forms/entityfilters/is_weather.form.json +2 -1
- package/data/forms/entityfilters/light_level.form.json +2 -1
- package/data/forms/entityfilters/moon_intensity.form.json +2 -1
- package/data/forms/entityfilters/moon_phase.form.json +2 -1
- package/data/forms/entityfilters/on_fire.form.json +2 -1
- package/data/forms/entityfilters/on_ground.form.json +2 -1
- package/data/forms/entityfilters/on_hot_block.form.json +2 -1
- package/data/forms/entityfilters/on_ladder.form.json +2 -1
- package/data/forms/entityfilters/owner_distance.form.json +2 -1
- package/data/forms/entityfilters/random_chance.form.json +2 -1
- package/data/forms/entityfilters/rider_count.form.json +84 -3
- package/data/forms/entityfilters/surface_mob.form.json +2 -1
- package/data/forms/entityfilters/taking_fire_damage.form.json +2 -1
- package/data/forms/entityfilters/target_distance.form.json +2 -1
- package/data/forms/entityfilters/trusts.form.json +2 -1
- package/data/forms/entityfilters/was_last_hurt_by.form.json +2 -1
- package/data/forms/entityfilters/weather.form.json +2 -1
- package/data/forms/entityfilters/weather_at_position.form.json +2 -1
- package/data/forms/index.json +1 -1
- package/data/forms/item/index.json +1 -1
- package/data/forms/item/minecraft_block_placer.form.json +44 -0
- package/data/forms/item/minecraft_bundle_interaction.form.json +10 -0
- package/data/forms/item/minecraft_compostable.form.json +11 -1
- package/data/forms/item/minecraft_damage_absorption.form.json +2 -1
- package/data/forms/item/minecraft_digger.form.json +63 -1
- package/data/forms/item/minecraft_durability.form.json +66 -0
- package/data/forms/item/minecraft_durability_sensor.form.json +26 -1
- package/data/forms/item/minecraft_dyeable.form.json +9 -1
- package/data/forms/item/minecraft_enchantable.form.json +54 -0
- package/data/forms/item/minecraft_entity_placer.form.json +143 -1
- package/data/forms/item/minecraft_food.form.json +97 -6
- package/data/forms/item/minecraft_fuel.form.json +2 -1
- package/data/forms/item/minecraft_glint.form.json +10 -1
- package/data/forms/item/minecraft_hover_text_color.form.json +2 -1
- package/data/forms/item/minecraft_icon.form.json +148 -1
- package/data/forms/item/minecraft_item.form.json +782 -123
- package/data/forms/item/minecraft_max_stack_size.form.json +80 -1
- package/data/forms/item/minecraft_projectile.form.json +14 -6
- package/data/forms/item/minecraft_rarity.form.json +2 -1
- package/data/forms/item/minecraft_repairable.form.json +151 -1
- package/data/forms/item/minecraft_shooter.form.json +37 -0
- package/data/forms/item/minecraft_storage_item.form.json +20 -2
- package/data/forms/item/minecraft_storage_weight_limit.form.json +7 -1
- package/data/forms/item/minecraft_tags.form.json +91 -1
- package/data/forms/item/minecraft_use_animation.form.json +36 -0
- package/data/forms/item/minecraft_use_modifiers.form.json +87 -0
- package/data/forms/item/minecraft_wearable.form.json +36 -0
- package/data/forms/misc/crafting_catalog_category.form.json +93 -1
- package/data/forms/misc/crafting_catalog_document.form.json +111 -1
- package/data/forms/misc/dimensiondocument.form.json +99 -1
- package/data/forms/misc/emitter_initialization.form.json +62 -14
- package/data/forms/misc/emitter_lifetime_expression.form.json +62 -14
- package/data/forms/misc/emitter_lifetime_looping.form.json +62 -14
- package/data/forms/misc/emitter_lifetime_once.form.json +32 -8
- package/data/forms/misc/emitter_rate_instant.form.json +32 -8
- package/data/forms/misc/emitter_rate_manual.form.json +32 -8
- package/data/forms/misc/emitter_rate_steady.form.json +62 -14
- package/data/forms/misc/emitter_shape_box.form.json +104 -10
- package/data/forms/misc/emitter_shape_custom.form.json +66 -4
- package/data/forms/misc/emitter_shape_disc.form.json +140 -21
- package/data/forms/misc/emitter_shape_entity_aabb.form.json +40 -8
- package/data/forms/misc/emitter_shape_point.form.json +66 -4
- package/data/forms/misc/emitter_shape_sphere.form.json +102 -15
- package/data/forms/misc/index.json +1 -1
- package/data/forms/misc/minecraft_aim_assist_categories.form.json +73 -1
- package/data/forms/misc/minecraft_aim_assist_preset.form.json +43 -1
- package/data/forms/misc/minecraft_jigsaw_structure_metadata.form.json +13 -1
- package/data/forms/misc/particle_appearance_billboard.form.json +36 -118
- package/data/forms/misc/particle_appearance_billboard_flipbook_data.form.json +112 -0
- package/data/forms/misc/particle_appearance_tinting.form.json +142 -8
- package/data/forms/misc/particle_curve_bezier_chain.form.json +39 -9
- package/data/forms/misc/particle_curve_linear.form.json +92 -15
- package/data/forms/misc/particle_effect.form.json +2410 -438
- package/data/forms/misc/particle_effect_basic_render_parameters.form.json +1 -1
- package/data/forms/misc/particle_effect_component.form.json +1530 -432
- package/data/forms/misc/particle_event_node.form.json +692 -0
- package/data/forms/misc/particle_initial_spin.form.json +76 -0
- package/data/forms/misc/particle_initialization.form.json +76 -0
- package/data/forms/misc/particle_lifetime_expression.form.json +76 -0
- package/data/forms/misc/particle_motion_collision.form.json +119 -0
- package/data/forms/misc/particle_motion_dynamic.form.json +148 -0
- package/data/forms/misc/particle_motion_parametric.form.json +115 -0
- package/data/forms/misc/v1_21_20_constantheight.form.json +18 -0
- package/data/forms/misc/v1_21_20_jigsawstructuredefinition_description.form.json +12 -0
- package/data/forms/misc/v1_21_20_poolaliases_direct.form.json +18 -0
- package/data/forms/misc/v1_21_20_poolaliases_randomgroup.form.json +30 -0
- package/data/forms/misc/v1_21_20_uniformheight.form.json +24 -0
- package/data/forms/spawn/index.json +1 -1
- package/data/forms/spawn/legacy_spawn_contents.form.json +532 -0
- package/data/forms/spawn/struct_sharedtypes_legacy_spawn_contents.form.json +36 -0
- package/data/forms/spawn/struct_sharedtypes_v1_21_60_spawn_contents.form.json +45 -3
- package/data/forms/spawn/v1_21_60_spawn_contents.form.json +268 -0
- package/data/forms/world/feature_rule_definition.form.json +361 -33
- package/data/forms/world/index.json +1 -1
- package/data/forms/world/jigsawstructure.form.json +206 -0
- package/data/forms/world/scatter_params.form.json +222 -30
- package/data/gallery.json +10 -0
- package/data/mci/release.mci.json +1 -1
- package/dataform/DataFormUtilities.js +13 -0
- package/dataform/FieldUtilities.js +18 -0
- package/dataform/ICondition.js +1 -0
- package/dataform/IField.js +1 -0
- package/docgen/FormDefinitionTypeScriptGenerator.js +554 -0
- package/docgen/FormJsonDocumentationGenerator.js +262 -38
- package/docgen/FormMarkdownDocumentationGenerator.js +216 -100
- package/info/GeneratorRegistrations.js +6 -0
- package/info/ProjectInfoSet.js +5 -4
- package/info/ProjectInfoUtilities.js +9 -0
- package/info/StrictPlatformInfoGenerator.js +4 -3
- package/info/TypesInfoGenerator.js +22 -0
- package/manager/BlocksCatalogManager.js +18 -15
- package/manager/EntityTypeManager.js +4 -4
- package/manager/ItemTypeManager.js +28 -27
- package/maps/app/IProjectItemData.js.map +1 -1
- package/maps/app/Project.js.map +1 -1
- package/maps/app/ProjectExporter.js.map +1 -1
- package/maps/app/ProjectItem.js.map +1 -1
- package/maps/app/ProjectItemUtilities.js.map +1 -1
- package/maps/app/ProjectUtilities.js.map +1 -1
- package/maps/cli/TaskWorker.js.map +1 -1
- package/maps/core/Constants.js.map +1 -1
- package/maps/core/ContentIndex.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/ICondition.js.map +1 -1
- package/maps/dataform/IField.js.map +1 -1
- package/maps/docgen/FormDefinitionTypeScriptGenerator.js.map +1 -0
- package/maps/docgen/FormJsonDocumentationGenerator.js.map +1 -1
- package/maps/docgen/FormMarkdownDocumentationGenerator.js.map +1 -1
- package/maps/info/GeneratorRegistrations.js.map +1 -1
- package/maps/info/IProjectInfo.js.map +1 -1
- package/maps/info/ProjectInfoSet.js.map +1 -1
- package/maps/info/ProjectInfoUtilities.js.map +1 -1
- package/maps/info/StrictPlatformInfoGenerator.js.map +1 -1
- package/maps/info/TypesInfoGenerator.js.map +1 -1
- package/maps/manager/BlocksCatalogManager.js.map +1 -1
- package/maps/manager/EntityTypeManager.js.map +1 -1
- package/maps/manager/ItemTypeManager.js.map +1 -1
- package/maps/minecraft/BehaviorManifestDefinition.js.map +1 -1
- package/maps/minecraft/BlocksCatalogDefinition.js.map +1 -1
- package/maps/minecraft/Database.js.map +1 -1
- package/maps/minecraft/EntityTypeDefinition.js.map +1 -1
- package/maps/minecraft/FeatureDefinition.js.map +1 -0
- package/maps/minecraft/FeatureRuleDefinition.js.map +1 -0
- package/maps/minecraft/IEventAction.js.map +1 -1
- package/maps/minecraft/ManagedEventAction.js.map +1 -1
- package/maps/minecraft/ManagedPermutation.js.map +1 -1
- package/maps/minecraft/Molang.js.map +1 -0
- package/maps/minecraft/MolangNode.js.map +1 -0
- package/maps/minecraft/ResourceManifestDefinition.js.map +1 -1
- package/maps/minecraft/WorldChunk.js.map +1 -1
- package/maps/minecraft/jsoncommon/MinecraftEventTrigger.js.map +1 -0
- package/maps/minecraft/jsoncommon/MinecraftFeatureBase.js.map +1 -0
- package/maps/minecraft/jsoncommon/MinecraftFilter.js.map +1 -0
- package/maps/minecraft/jsoncommon/MinecraftFilterClause.js.map +1 -0
- package/maps/minecraft/jsoncommon/MinecraftFilterClauseSet.js.map +1 -0
- package/maps/storage/BasicValidators.js.map +1 -0
- package/maps/storage/DifferenceSet.js.map +1 -1
- package/maps/storage/FolderBase.js.map +1 -1
- package/maps/storage/StorageUtilities.js.map +1 -1
- package/maps/storage/ZipFile.js.map +1 -1
- package/maps/storage/ZipStorage.js.map +1 -1
- package/minecraft/BehaviorManifestDefinition.js +15 -0
- package/minecraft/BlocksCatalogDefinition.js +52 -9
- package/minecraft/Database.js +19 -4
- package/minecraft/EntityTypeDefinition.js +7 -1
- package/minecraft/FeatureDefinition.js +144 -0
- package/minecraft/FeatureRuleDefinition.js +107 -0
- package/minecraft/ManagedPermutation.js +12 -0
- package/minecraft/Molang.js +72 -0
- package/minecraft/MolangNode.js +13 -0
- package/minecraft/ResourceManifestDefinition.js +15 -0
- package/minecraft/WorldChunk.js +1 -1
- package/minecraft/{IFilterClauseSet.js → jsoncommon/MinecraftEventTrigger.js} +1 -1
- package/minecraft/jsoncommon/MinecraftFeatureBase.js +4 -0
- package/minecraft/{IEventTrigger.js → jsoncommon/MinecraftFilter.js} +1 -1
- package/minecraft/{IFilterClause.js → jsoncommon/MinecraftFilterClause.js} +1 -1
- package/minecraft/jsoncommon/MinecraftFilterClauseSet.js +6 -0
- package/package.json +2 -1
- package/storage/BasicValidators.js +97 -0
- package/storage/DifferenceSet.js +1 -1
- package/storage/FolderBase.js +6 -3
- package/storage/StorageUtilities.js +195 -64
- package/storage/ZipFile.js +1 -1
- package/storage/ZipStorage.js +16 -0
- package/data/forms/forms/block/index.json +0 -1
- package/data/forms/forms/block_culling/index.json +0 -1
- package/data/forms/forms/camera/index.json +0 -1
- package/data/forms/forms/entity/index.json +0 -1
- package/data/forms/forms/feature/index.json +0 -1
- package/data/forms/forms/index.json +0 -1
- package/data/forms/forms/item/index.json +0 -1
- package/data/forms/forms/jigsaw/index.json +0 -1
- package/data/forms/forms/misc/index.json +0 -1
- package/data/forms/forms/trade/index.json +0 -1
- package/data/forms/item/minecraft_hand_equippped.form.json +0 -11
- package/maps/minecraft/IEventTrigger.js.map +0 -1
- package/maps/minecraft/IFilterClause.js.map +0 -1
- package/maps/minecraft/IFilterClauseSet.js.map +0 -1
- /package/data/forms/{clientbiome → client_biome}/minecraft_ambient_sounds.form.json +0 -0
- /package/data/forms/{clientbiome → client_biome}/minecraft_fog_appearance.form.json +0 -0
- /package/data/forms/{clientbiome → client_biome}/minecraft_foliage_appearance.form.json +0 -0
- /package/data/forms/{clientbiome → client_biome}/minecraft_grass_appearance.form.json +0 -0
package/NOTICE.md
CHANGED
|
@@ -143,6 +143,28 @@ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
143
143
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
144
144
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
145
145
|
|
|
146
|
+
### obscenity
|
|
147
|
+
|
|
148
|
+
Copyright (c) 2021 Joe L.
|
|
149
|
+
|
|
150
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
151
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
152
|
+
in the Software without restriction, including without limitation the rights
|
|
153
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
154
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
155
|
+
furnished to do so, subject to the following conditions:
|
|
156
|
+
|
|
157
|
+
The above copyright notice and this permission notice shall be included in
|
|
158
|
+
all copies or substantial portions of the Software.
|
|
159
|
+
|
|
160
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
161
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
162
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
163
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
164
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
165
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
166
|
+
THE SOFTWARE.
|
|
167
|
+
|
|
146
168
|
### fontsource
|
|
147
169
|
|
|
148
170
|
#### MIT License
|
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 = 138;
|
|
7
7
|
var ProjectItemCategory;
|
|
8
8
|
(function (ProjectItemCategory) {
|
|
9
9
|
ProjectItemCategory[ProjectItemCategory["assets"] = 0] = "assets";
|
|
@@ -147,6 +147,14 @@ var ProjectItemType;
|
|
|
147
147
|
ProjectItemType[ProjectItemType["blockCulling"] = 127] = "blockCulling";
|
|
148
148
|
ProjectItemType[ProjectItemType["craftingItemCatalog"] = 128] = "craftingItemCatalog";
|
|
149
149
|
ProjectItemType[ProjectItemType["mcToolsProjectPreferences"] = 129] = "mcToolsProjectPreferences";
|
|
150
|
+
ProjectItemType[ProjectItemType["educationJson"] = 130] = "educationJson";
|
|
151
|
+
ProjectItemType[ProjectItemType["aimAssistJson"] = 131] = "aimAssistJson";
|
|
152
|
+
ProjectItemType[ProjectItemType["colorGradingJson"] = 132] = "colorGradingJson";
|
|
153
|
+
ProjectItemType[ProjectItemType["atmosphericsJson"] = 133] = "atmosphericsJson";
|
|
154
|
+
ProjectItemType[ProjectItemType["pbrJson"] = 134] = "pbrJson";
|
|
155
|
+
ProjectItemType[ProjectItemType["pointLightsJson"] = 135] = "pointLightsJson";
|
|
156
|
+
ProjectItemType[ProjectItemType["waterJson"] = 136] = "waterJson";
|
|
157
|
+
ProjectItemType[ProjectItemType["shadowsJson"] = 137] = "shadowsJson";
|
|
150
158
|
})(ProjectItemType = exports.ProjectItemType || (exports.ProjectItemType = {}));
|
|
151
159
|
var ProjectItemStorageType;
|
|
152
160
|
(function (ProjectItemStorageType) {
|
package/app/Project.js
CHANGED
|
@@ -1292,6 +1292,9 @@ class Project {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
this.collapsedStoragePaths.push(storagePath);
|
|
1294
1294
|
}
|
|
1295
|
+
get isVanillaSourceProject() {
|
|
1296
|
+
return this.defaultBehaviorPackUniqueId === "ee649bcf-256c-4013-9068-6a802b89d756";
|
|
1297
|
+
}
|
|
1295
1298
|
ensureStoragePathIsNotCollapsed(storagePath) {
|
|
1296
1299
|
const newCollapsedPaths = [];
|
|
1297
1300
|
for (const pathCollapsed of this.collapsedStoragePaths) {
|
|
@@ -1447,12 +1450,14 @@ class Project {
|
|
|
1447
1450
|
if (manifest.header.uuid !== undefined) {
|
|
1448
1451
|
if (folderContext === FolderContext.behaviorPack) {
|
|
1449
1452
|
this.defaultBehaviorPackUniqueId = manifest.header.uuid;
|
|
1453
|
+
this.defaultBehaviorPackVersion = manifest.header.version;
|
|
1450
1454
|
__classPrivateFieldSet(this, _Project_defaultBehaviorPackFolder, folder, "f");
|
|
1451
1455
|
__classPrivateFieldSet(this, _Project_behaviorPacksContainer, parentFolder, "f");
|
|
1452
1456
|
this.ensurePackByFolder(folder, Pack_1.PackType.behavior);
|
|
1453
1457
|
}
|
|
1454
1458
|
else if (folderContext === FolderContext.resourcePack) {
|
|
1455
1459
|
this.defaultResourcePackUniqueId = manifest.header.uuid;
|
|
1460
|
+
this.defaultResourcePackVersion = manifest.header.version;
|
|
1456
1461
|
__classPrivateFieldSet(this, _Project_defaultResourcePackFolder, folder, "f");
|
|
1457
1462
|
__classPrivateFieldSet(this, _Project_resourcePacksContainer, parentFolder, "f");
|
|
1458
1463
|
this.ensurePackByFolder(folder, Pack_1.PackType.resource);
|
|
@@ -1645,6 +1650,19 @@ class Project {
|
|
|
1645
1650
|
folderPathLower.indexOf("/spawn_rules/") >= 0) {
|
|
1646
1651
|
newJsonType = IProjectItemData_1.ProjectItemType.spawnRuleBehavior;
|
|
1647
1652
|
}
|
|
1653
|
+
else if (folderContext === FolderContext.behaviorPack &&
|
|
1654
|
+
folderPathLower.indexOf("/cameras/") >= 0 &&
|
|
1655
|
+
folderPathLower.indexOf("aim_assist_preset") >= 0) {
|
|
1656
|
+
newJsonType = IProjectItemData_1.ProjectItemType.aimAssistJson;
|
|
1657
|
+
}
|
|
1658
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1659
|
+
folderPathLower.indexOf("/atmospherics/") >= 0) {
|
|
1660
|
+
newJsonType = IProjectItemData_1.ProjectItemType.atmosphericsJson;
|
|
1661
|
+
}
|
|
1662
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1663
|
+
folderPathLower.indexOf("/color_grading/") >= 0) {
|
|
1664
|
+
newJsonType = IProjectItemData_1.ProjectItemType.colorGradingJson;
|
|
1665
|
+
}
|
|
1648
1666
|
else if (folderContext === FolderContext.behaviorPack && folderPathLower.indexOf("/cameras/") >= 0) {
|
|
1649
1667
|
newJsonType = IProjectItemData_1.ProjectItemType.cameraJson;
|
|
1650
1668
|
}
|
|
@@ -1756,6 +1774,22 @@ class Project {
|
|
|
1756
1774
|
folderPathLower.indexOf("/lighting/") >= 0) {
|
|
1757
1775
|
newJsonType = IProjectItemData_1.ProjectItemType.lightingJson;
|
|
1758
1776
|
}
|
|
1777
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1778
|
+
folderPathLower.indexOf("/point_lights/") >= 0) {
|
|
1779
|
+
newJsonType = IProjectItemData_1.ProjectItemType.lightingJson;
|
|
1780
|
+
}
|
|
1781
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1782
|
+
folderPathLower.indexOf("/pbr/") >= 0) {
|
|
1783
|
+
newJsonType = IProjectItemData_1.ProjectItemType.pbrJson;
|
|
1784
|
+
}
|
|
1785
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1786
|
+
folderPathLower.indexOf("/water/") >= 0) {
|
|
1787
|
+
newJsonType = IProjectItemData_1.ProjectItemType.waterJson;
|
|
1788
|
+
}
|
|
1789
|
+
else if ((folderContext === FolderContext.resourcePack || folderContext === FolderContext.resourcePackSubPack) &&
|
|
1790
|
+
folderPathLower.indexOf("/shadows/") >= 0) {
|
|
1791
|
+
newJsonType = IProjectItemData_1.ProjectItemType.shadowsJson;
|
|
1792
|
+
}
|
|
1759
1793
|
else if (folderContext === FolderContext.resourcePack && folderPathLower.indexOf("/ui/") >= 0) {
|
|
1760
1794
|
newJsonType = IProjectItemData_1.ProjectItemType.uiJson;
|
|
1761
1795
|
}
|
|
@@ -1783,6 +1817,9 @@ class Project {
|
|
|
1783
1817
|
else if (folderContext === FolderContext.resourcePack && baseName === "sounds") {
|
|
1784
1818
|
newJsonType = IProjectItemData_1.ProjectItemType.soundCatalog;
|
|
1785
1819
|
}
|
|
1820
|
+
else if (baseName === "education") {
|
|
1821
|
+
newJsonType = IProjectItemData_1.ProjectItemType.educationJson;
|
|
1822
|
+
}
|
|
1786
1823
|
else if (baseName === "world_behavior_packs") {
|
|
1787
1824
|
newJsonType = IProjectItemData_1.ProjectItemType.behaviorPackListJson;
|
|
1788
1825
|
}
|
|
@@ -2069,7 +2106,7 @@ class Project {
|
|
|
2069
2106
|
__classPrivateFieldSet(this, _Project_resourcePacksContainer, parentFolder, "f");
|
|
2070
2107
|
}
|
|
2071
2108
|
}
|
|
2072
|
-
else if (!isWorld && __classPrivateFieldGet(this, _Project_defaultBehaviorPackFolder, "f") === null) {
|
|
2109
|
+
else if (!isWorld && !isResource && __classPrivateFieldGet(this, _Project_defaultBehaviorPackFolder, "f") === null) {
|
|
2073
2110
|
__classPrivateFieldSet(this, _Project_defaultBehaviorPackFolder, folder, "f");
|
|
2074
2111
|
if (parentFolder !== null) {
|
|
2075
2112
|
__classPrivateFieldSet(this, _Project_behaviorPacksContainer, parentFolder, "f");
|
package/app/ProjectExporter.js
CHANGED
|
@@ -18,6 +18,7 @@ const CartoApp_1 = require("./CartoApp");
|
|
|
18
18
|
const HttpStorage_1 = require("../storage/HttpStorage");
|
|
19
19
|
const ProjectBuild_1 = require("./ProjectBuild");
|
|
20
20
|
const WorldLevelDat_1 = require("../minecraft/WorldLevelDat");
|
|
21
|
+
const IProjectItemData_1 = require("./IProjectItemData");
|
|
21
22
|
exports.ProjectImportExclusions = [
|
|
22
23
|
"build",
|
|
23
24
|
"node_modules",
|
|
@@ -37,8 +38,9 @@ class ProjectExporter {
|
|
|
37
38
|
Log_1.default.unexpectedNull();
|
|
38
39
|
return undefined;
|
|
39
40
|
}
|
|
40
|
-
const mcworld = await this.
|
|
41
|
+
const mcworld = await this.generateWorldWithPacksAndContent(project, name, undefined, {
|
|
41
42
|
generator: WorldLevelDat_1.Generator.flat,
|
|
43
|
+
betaApisExperiment: true,
|
|
42
44
|
});
|
|
43
45
|
if (!mcworld) {
|
|
44
46
|
return undefined;
|
|
@@ -427,10 +429,10 @@ class ProjectExporter {
|
|
|
427
429
|
}
|
|
428
430
|
await mcworld.load(false);
|
|
429
431
|
await mcworld.applyWorldSettings(worldSettings);
|
|
432
|
+
await ProjectExporter.ensureExperimentsEnabledOnWorld(mcworld, project);
|
|
430
433
|
if (projectBuild) {
|
|
431
434
|
await ProjectExporter.deployProjectPacks(project, projectBuild, targetFolder, mcworld);
|
|
432
435
|
}
|
|
433
|
-
mcworld.betaApisExperiment = true;
|
|
434
436
|
mcworld.name = project.name;
|
|
435
437
|
await targetFolder.saveAll();
|
|
436
438
|
await mcworld.save();
|
|
@@ -540,7 +542,7 @@ class ProjectExporter {
|
|
|
540
542
|
return;
|
|
541
543
|
}
|
|
542
544
|
const fileName = project.name + " flatpack.mcworld";
|
|
543
|
-
const name = project.name + " Flat
|
|
545
|
+
const name = project.name + " Flat";
|
|
544
546
|
const mcworld = await ProjectExporter.generateFlatGameTestWorldWithPackRefs(project, name);
|
|
545
547
|
if (mcworld !== undefined) {
|
|
546
548
|
const newBytes = await mcworld.getBytes();
|
|
@@ -588,7 +590,7 @@ class ProjectExporter {
|
|
|
588
590
|
return zipBytes;
|
|
589
591
|
}
|
|
590
592
|
}
|
|
591
|
-
static async
|
|
593
|
+
static async generateWorldWithPacksAndContent(project, worldName, worldContent, worldSettings) {
|
|
592
594
|
await project.ensureLoadedProjectFolder();
|
|
593
595
|
const mcworld = new MCWorld_1.default();
|
|
594
596
|
if (worldContent) {
|
|
@@ -606,11 +608,36 @@ class ProjectExporter {
|
|
|
606
608
|
if (!projectBuild) {
|
|
607
609
|
return undefined;
|
|
608
610
|
}
|
|
609
|
-
mcworld
|
|
611
|
+
await this.ensureExperimentsEnabledOnWorld(mcworld, project);
|
|
610
612
|
mcworld.name = worldName;
|
|
611
613
|
await ProjectExporter.deployProjectPacks(project, projectBuild, mcworld.storage.rootFolder, mcworld);
|
|
612
614
|
return mcworld;
|
|
613
615
|
}
|
|
616
|
+
static async ensureExperimentsEnabledOnWorld(mcworld, project) {
|
|
617
|
+
const itemsCopy = project.getItemsCopy();
|
|
618
|
+
for (const projectItem of itemsCopy) {
|
|
619
|
+
if (projectItem.itemType === IProjectItemData_1.ProjectItemType.behaviorPackManifestJson) {
|
|
620
|
+
await projectItem.ensureFileStorage();
|
|
621
|
+
if (projectItem.file) {
|
|
622
|
+
await projectItem.file.loadContent();
|
|
623
|
+
let content = projectItem.file.content;
|
|
624
|
+
if (typeof content === "string" && content.indexOf("-beta") >= 0) {
|
|
625
|
+
mcworld.betaApisExperiment = true;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
else if (projectItem.itemType === IProjectItemData_1.ProjectItemType.resourcePackManifestJson) {
|
|
630
|
+
await projectItem.ensureFileStorage();
|
|
631
|
+
if (projectItem.file) {
|
|
632
|
+
await projectItem.file.loadContent();
|
|
633
|
+
let content = projectItem.file.content;
|
|
634
|
+
if (typeof content === "string" && content.indexOf("pbr") >= 0 && content.indexOf("capabilities") >= 0) {
|
|
635
|
+
mcworld.deferredTechnicalPreviewExperiment = true;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
614
641
|
static async generateBetaApisWorldWithPackRefs(project, worldName, worldContent) {
|
|
615
642
|
const mcworld = new MCWorld_1.default();
|
|
616
643
|
mcworld.project = project;
|
package/app/ProjectItem.js
CHANGED
|
@@ -261,6 +261,8 @@ class ProjectItem {
|
|
|
261
261
|
return "behavior/dialogue/dialogue.json";
|
|
262
262
|
case IProjectItemData_2.ProjectItemType.entityTypeBehavior:
|
|
263
263
|
return "behavior/entities/entities.json";
|
|
264
|
+
case IProjectItemData_2.ProjectItemType.atmosphericsJson:
|
|
265
|
+
return "behavior/lighting/atmospherics.json";
|
|
264
266
|
case IProjectItemData_2.ProjectItemType.blocksCatalogResourceJson:
|
|
265
267
|
return "resource/blocks.json";
|
|
266
268
|
case IProjectItemData_2.ProjectItemType.soundCatalog:
|
|
@@ -2,11 +2,49 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.FormMappings = void 0;
|
|
5
6
|
const Utilities_1 = require("../core/Utilities");
|
|
6
7
|
const Pack_1 = require("../minecraft/Pack");
|
|
7
8
|
const StorageUtilities_1 = require("../storage/StorageUtilities");
|
|
8
9
|
const IProjectItemData_1 = require("./IProjectItemData");
|
|
9
10
|
const ProjectUtilities_1 = require("./ProjectUtilities");
|
|
11
|
+
exports.FormMappings = {
|
|
12
|
+
/* ["" + ProjectItemType.atmosphericsJson]: {
|
|
13
|
+
formCategory: "client_deferred_rendering",
|
|
14
|
+
formName: "atmosphericscattering_atmosphericscatteringconfigsettings",
|
|
15
|
+
select: "minecraft:atmosphere_settings",
|
|
16
|
+
},
|
|
17
|
+
["" + ProjectItemType.colorGradingJson]: {
|
|
18
|
+
formCategory: "client_deferred_rendering",
|
|
19
|
+
formName: "colorgraderconfig_colorgradingparameterssrc",
|
|
20
|
+
select: "minecraft:color_grading_settings",
|
|
21
|
+
},
|
|
22
|
+
["" + ProjectItemType.lightingJson]: {
|
|
23
|
+
formCategory: "client_deferred_rendering",
|
|
24
|
+
formName: "lightinggroup_lightingimpl_1_21_70",
|
|
25
|
+
select: "minecraft:lighting_settings",
|
|
26
|
+
},
|
|
27
|
+
["" + ProjectItemType.pbrJson]: {
|
|
28
|
+
formCategory: "client_deferred_rendering",
|
|
29
|
+
formName: "pbrfallbackconfig_pbrfallbackconfigsettings",
|
|
30
|
+
select: "minecraft:pbr_fallback_settings",
|
|
31
|
+
},
|
|
32
|
+
["" + ProjectItemType.waterJson]: {
|
|
33
|
+
formCategory: "client_deferred_rendering",
|
|
34
|
+
formName: "waterconfig_waterconfigsettingsv1",
|
|
35
|
+
select: "minecraft:water_settings",
|
|
36
|
+
},
|
|
37
|
+
["" + ProjectItemType.shadowsJson]: {
|
|
38
|
+
formCategory: "client_deferred_rendering",
|
|
39
|
+
formName: "shadowstylizationconfig_shadowstylizationconfigsettings",
|
|
40
|
+
select: "minecraft:shadow_settings",
|
|
41
|
+
},
|
|
42
|
+
["" + ProjectItemType.pointLightsJson]: {
|
|
43
|
+
formCategory: "client_deferred_rendering",
|
|
44
|
+
formName: "pointlightconfig_pointlightconfigsettings",
|
|
45
|
+
select: "minecraft:point_light_settings",
|
|
46
|
+
},*/
|
|
47
|
+
};
|
|
10
48
|
class ProjectItemUtilities {
|
|
11
49
|
static inferTypeFromContent(content, fileName) {
|
|
12
50
|
const type = StorageUtilities_1.default.getTypeFromName(fileName);
|
|
@@ -293,6 +331,13 @@ class ProjectItemUtilities {
|
|
|
293
331
|
case IProjectItemData_1.ProjectItemType.resourcePackManifestJson:
|
|
294
332
|
case IProjectItemData_1.ProjectItemType.entityTypeBehavior:
|
|
295
333
|
case IProjectItemData_1.ProjectItemType.tickJson:
|
|
334
|
+
case IProjectItemData_1.ProjectItemType.aimAssistJson:
|
|
335
|
+
case IProjectItemData_1.ProjectItemType.waterJson:
|
|
336
|
+
case IProjectItemData_1.ProjectItemType.shadowsJson:
|
|
337
|
+
case IProjectItemData_1.ProjectItemType.pbrJson:
|
|
338
|
+
case IProjectItemData_1.ProjectItemType.atmosphericsJson:
|
|
339
|
+
case IProjectItemData_1.ProjectItemType.pointLightsJson:
|
|
340
|
+
case IProjectItemData_1.ProjectItemType.colorGradingJson:
|
|
296
341
|
case IProjectItemData_1.ProjectItemType.cameraJson:
|
|
297
342
|
case IProjectItemData_1.ProjectItemType.actionSet:
|
|
298
343
|
case IProjectItemData_1.ProjectItemType.worldTest:
|
|
@@ -367,6 +412,7 @@ class ProjectItemUtilities {
|
|
|
367
412
|
case IProjectItemData_1.ProjectItemType.dimensionJson:
|
|
368
413
|
case IProjectItemData_1.ProjectItemType.behaviorPackHistoryListJson:
|
|
369
414
|
case IProjectItemData_1.ProjectItemType.resourcePackHistoryListJson:
|
|
415
|
+
case IProjectItemData_1.ProjectItemType.educationJson:
|
|
370
416
|
return ["application/json"];
|
|
371
417
|
case IProjectItemData_1.ProjectItemType.MCWorld:
|
|
372
418
|
case IProjectItemData_1.ProjectItemType.MCTemplate:
|
|
@@ -451,8 +497,22 @@ class ProjectItemUtilities {
|
|
|
451
497
|
return "Fragment";
|
|
452
498
|
case IProjectItemData_1.ProjectItemType.materialVertex:
|
|
453
499
|
return "Vertex";
|
|
500
|
+
case IProjectItemData_1.ProjectItemType.shadowsJson:
|
|
501
|
+
return "Shadow";
|
|
502
|
+
case IProjectItemData_1.ProjectItemType.waterJson:
|
|
503
|
+
return "Water";
|
|
504
|
+
case IProjectItemData_1.ProjectItemType.pbrJson:
|
|
505
|
+
return "PBR";
|
|
506
|
+
case IProjectItemData_1.ProjectItemType.atmosphericsJson:
|
|
507
|
+
return "Atmospherics";
|
|
508
|
+
case IProjectItemData_1.ProjectItemType.pointLightsJson:
|
|
509
|
+
return "Point Light";
|
|
510
|
+
case IProjectItemData_1.ProjectItemType.colorGradingJson:
|
|
511
|
+
return "Color Grading";
|
|
454
512
|
case IProjectItemData_1.ProjectItemType.cameraJson:
|
|
455
513
|
return "Camera";
|
|
514
|
+
case IProjectItemData_1.ProjectItemType.aimAssistJson:
|
|
515
|
+
return "Aim Assist";
|
|
456
516
|
case IProjectItemData_1.ProjectItemType.catalogIndexJs:
|
|
457
517
|
return "Catalog index";
|
|
458
518
|
case IProjectItemData_1.ProjectItemType.behaviorPackFolder:
|
|
@@ -475,8 +535,6 @@ class ProjectItemUtilities {
|
|
|
475
535
|
return "Behavior pack animation controller";
|
|
476
536
|
case IProjectItemData_1.ProjectItemType.blockTypeBehavior:
|
|
477
537
|
return "Block type";
|
|
478
|
-
case IProjectItemData_1.ProjectItemType.blockMaterialsBehaviorJson:
|
|
479
|
-
return "Block type materials";
|
|
480
538
|
case IProjectItemData_1.ProjectItemType.itemTypeBehavior:
|
|
481
539
|
return "Item type";
|
|
482
540
|
case IProjectItemData_1.ProjectItemType.lootTableBehavior:
|
|
@@ -633,6 +691,8 @@ class ProjectItemUtilities {
|
|
|
633
691
|
return "Behavior pack history";
|
|
634
692
|
case IProjectItemData_1.ProjectItemType.resourcePackHistoryListJson:
|
|
635
693
|
return "Resource pack history";
|
|
694
|
+
case IProjectItemData_1.ProjectItemType.educationJson:
|
|
695
|
+
return "Education manifest";
|
|
636
696
|
default:
|
|
637
697
|
return "Unknown";
|
|
638
698
|
}
|
|
@@ -873,26 +933,27 @@ class ProjectItemUtilities {
|
|
|
873
933
|
return "TypeScript files";
|
|
874
934
|
case IProjectItemData_1.ProjectItemType.js:
|
|
875
935
|
return "JavaScript files";
|
|
876
|
-
case IProjectItemData_1.ProjectItemType.vsCodeTasksJson:
|
|
877
|
-
return "VS Code task sets";
|
|
878
|
-
case IProjectItemData_1.ProjectItemType.vsCodeSettingsJson:
|
|
879
|
-
return "VS Code settings sets";
|
|
880
|
-
case IProjectItemData_1.ProjectItemType.globalVariablesJson:
|
|
881
|
-
return "UI global variable sets";
|
|
882
936
|
case IProjectItemData_1.ProjectItemType.itemTypeResourceJson:
|
|
883
937
|
return "Item type visuals and audio";
|
|
884
|
-
case IProjectItemData_1.ProjectItemType.materialGeometry:
|
|
885
|
-
return "Model shapes";
|
|
886
938
|
case IProjectItemData_1.ProjectItemType.entityTypeResource:
|
|
887
939
|
return "Entity type visuals/audio";
|
|
888
940
|
case IProjectItemData_1.ProjectItemType.catalogIndexJs:
|
|
889
941
|
return "Catalog indexes";
|
|
890
|
-
case IProjectItemData_1.ProjectItemType.mcToolsProjectPreferences:
|
|
891
|
-
return "MCTools preferences";
|
|
892
942
|
case IProjectItemData_1.ProjectItemType.behaviorPackHistoryListJson:
|
|
893
943
|
return "Behavior pack histories";
|
|
894
944
|
case IProjectItemData_1.ProjectItemType.resourcePackHistoryListJson:
|
|
895
945
|
return "Resource pack histories";
|
|
946
|
+
case IProjectItemData_1.ProjectItemType.globalVariablesJson:
|
|
947
|
+
case IProjectItemData_1.ProjectItemType.materialGeometry:
|
|
948
|
+
case IProjectItemData_1.ProjectItemType.atmosphericsJson:
|
|
949
|
+
case IProjectItemData_1.ProjectItemType.biomeResourceJson:
|
|
950
|
+
case IProjectItemData_1.ProjectItemType.vsCodeTasksJson:
|
|
951
|
+
case IProjectItemData_1.ProjectItemType.vsCodeSettingsJson:
|
|
952
|
+
case IProjectItemData_1.ProjectItemType.vsCodeExtensionsJson:
|
|
953
|
+
case IProjectItemData_1.ProjectItemType.mcToolsProjectPreferences:
|
|
954
|
+
case IProjectItemData_1.ProjectItemType.materialsResourceJson:
|
|
955
|
+
case IProjectItemData_1.ProjectItemType.lang:
|
|
956
|
+
return this.getDescriptionForType(type);
|
|
896
957
|
default:
|
|
897
958
|
return this.getDescriptionForType(type) + "s";
|
|
898
959
|
}
|
|
@@ -1003,7 +1064,19 @@ class ProjectItemUtilities {
|
|
|
1003
1064
|
case IProjectItemData_1.ProjectItemType.worldFolder:
|
|
1004
1065
|
case IProjectItemData_1.ProjectItemType.MCWorld:
|
|
1005
1066
|
return ["worlds"];
|
|
1006
|
-
case IProjectItemData_1.ProjectItemType.
|
|
1067
|
+
case IProjectItemData_1.ProjectItemType.colorGradingJson:
|
|
1068
|
+
return ["color_grading"];
|
|
1069
|
+
case IProjectItemData_1.ProjectItemType.atmosphericsJson:
|
|
1070
|
+
return ["atmospherics"];
|
|
1071
|
+
case IProjectItemData_1.ProjectItemType.pbrJson:
|
|
1072
|
+
return ["pbr"];
|
|
1073
|
+
case IProjectItemData_1.ProjectItemType.pointLightsJson:
|
|
1074
|
+
return ["point_lights"];
|
|
1075
|
+
case IProjectItemData_1.ProjectItemType.shadowsJson:
|
|
1076
|
+
return ["shadows"];
|
|
1077
|
+
case IProjectItemData_1.ProjectItemType.waterJson:
|
|
1078
|
+
return ["water"];
|
|
1079
|
+
case IProjectItemData_1.ProjectItemType.aimAssistJson:
|
|
1007
1080
|
return ["cameras"];
|
|
1008
1081
|
case IProjectItemData_1.ProjectItemType.dimensionJson:
|
|
1009
1082
|
return ["dimensions"];
|
package/app/ProjectUtilities.js
CHANGED
|
@@ -25,6 +25,7 @@ const ProjectStandard_1 = require("./ProjectStandard");
|
|
|
25
25
|
const ProjectAutogeneration_1 = require("./ProjectAutogeneration");
|
|
26
26
|
const MinecraftDefinitions_1 = require("../minecraft/MinecraftDefinitions");
|
|
27
27
|
const TypeScriptDefinition_1 = require("../minecraft/TypeScriptDefinition");
|
|
28
|
+
const Constants_1 = require("../core/Constants");
|
|
28
29
|
var NewEntityTypeAddMode;
|
|
29
30
|
(function (NewEntityTypeAddMode) {
|
|
30
31
|
NewEntityTypeAddMode[NewEntityTypeAddMode["baseId"] = 0] = "baseId";
|
|
@@ -210,6 +211,28 @@ class ProjectUtilities {
|
|
|
210
211
|
static async applyShortName(project, newShortName) {
|
|
211
212
|
project.shortName = newShortName;
|
|
212
213
|
}
|
|
214
|
+
static async ensureGeneratedWith(project, isToolWeb) {
|
|
215
|
+
const appName = isToolWeb ? "mctoolsweb" : "mctoolscli";
|
|
216
|
+
if (project.editPreference === IProjectData_1.ProjectEditPreference.summarized && project.defaultBehaviorPackUniqueId) {
|
|
217
|
+
const itemsCopy = project.getItemsCopy();
|
|
218
|
+
for (const projectItem of itemsCopy) {
|
|
219
|
+
if (projectItem.file && projectItem.itemType === IProjectItemData_1.ProjectItemType.behaviorPackManifestJson) {
|
|
220
|
+
const bpManifestJson = await BehaviorManifestDefinition_1.default.ensureOnFile(projectItem.file);
|
|
221
|
+
if (bpManifestJson && bpManifestJson.definition) {
|
|
222
|
+
bpManifestJson.ensureGeneratedWith(appName, Constants_1.constants.version);
|
|
223
|
+
await bpManifestJson.save();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else if (projectItem.file && projectItem.itemType === IProjectItemData_1.ProjectItemType.resourcePackManifestJson) {
|
|
227
|
+
const rpManifestJson = await ResourceManifestDefinition_1.default.ensureOnFile(projectItem.file);
|
|
228
|
+
if (rpManifestJson && rpManifestJson.definition) {
|
|
229
|
+
rpManifestJson.ensureGeneratedWith(appName, Constants_1.constants.version);
|
|
230
|
+
await rpManifestJson.save();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
213
236
|
static async applyTitle(project, newTitle) {
|
|
214
237
|
project.title = newTitle;
|
|
215
238
|
if (project.editPreference === IProjectData_1.ProjectEditPreference.summarized && project.defaultBehaviorPackUniqueId) {
|
|
@@ -363,7 +386,7 @@ class ProjectUtilities {
|
|
|
363
386
|
}
|
|
364
387
|
return scriptsFolder.getFolderRelativePath(project.projectFolder);
|
|
365
388
|
}
|
|
366
|
-
static async processNewProject(project, title, description, suggestedShortName) {
|
|
389
|
+
static async processNewProject(project, title, description, suggestedShortName, isWeb) {
|
|
367
390
|
await project.inferProjectItemsFromFiles();
|
|
368
391
|
if (suggestedShortName) {
|
|
369
392
|
await ProjectExporter_1.default.renameDefaultFolders(project, suggestedShortName);
|
|
@@ -372,6 +395,7 @@ class ProjectUtilities {
|
|
|
372
395
|
await ProjectUtilities.randomizeAllUids(project);
|
|
373
396
|
await ProjectUtilities.applyTitle(project, title);
|
|
374
397
|
await ProjectUtilities.applyDescription(project, description);
|
|
398
|
+
await ProjectUtilities.ensureGeneratedWith(project, isWeb);
|
|
375
399
|
await ProjectStandard_1.default.ensureIsStandard(project);
|
|
376
400
|
const pur = new ProjectUpdateRunner_1.default(project);
|
|
377
401
|
await pur.updateProject();
|
package/cli/TaskWorker.js
CHANGED
|
@@ -11,6 +11,7 @@ const ProjectInfoSet_1 = require("../info/ProjectInfoSet");
|
|
|
11
11
|
const IInfoItemData_1 = require("../info/IInfoItemData");
|
|
12
12
|
const LocalEnvironment_1 = require("../local/LocalEnvironment");
|
|
13
13
|
const ProjectUtilities_1 = require("../app/ProjectUtilities");
|
|
14
|
+
const ZipStorage_1 = require("../storage/ZipStorage");
|
|
14
15
|
let carto;
|
|
15
16
|
let localEnv;
|
|
16
17
|
let outputStorage;
|
|
@@ -200,13 +201,22 @@ async function outputResults(projectSet, pis, fileNameModifier, outputStorage, m
|
|
|
200
201
|
const mciContentFile = indexFolder.ensureFile(StorageUtilities_1.default.ensureFileNameIsSafe(StorageUtilities_1.default.getBaseFromName(projectSet.projectContainerName)) +
|
|
201
202
|
fileNameModifier +
|
|
202
203
|
".mci.json");
|
|
204
|
+
const mciContentFileZip = indexFolder.ensureFile(StorageUtilities_1.default.ensureFileNameIsSafe(StorageUtilities_1.default.getBaseFromName(projectSet.projectContainerName)) +
|
|
205
|
+
fileNameModifier +
|
|
206
|
+
".mci.json.zip");
|
|
207
|
+
let contentStr = "";
|
|
203
208
|
if (outputType === ClUtils_1.OutputType.noReports) {
|
|
204
|
-
|
|
209
|
+
contentStr = pis.getStrictIndexJson(projectSet.projectName, projectSet.projectPath, undefined);
|
|
205
210
|
}
|
|
206
211
|
else {
|
|
207
|
-
|
|
212
|
+
contentStr = pis.getIndexJson(projectSet.projectName, projectSet.projectPath, undefined);
|
|
208
213
|
}
|
|
214
|
+
mciContentFile.setContent(contentStr);
|
|
209
215
|
mciContentFile.saveContent();
|
|
216
|
+
const zs = ZipStorage_1.default.fromJsonString(contentStr);
|
|
217
|
+
const contentBytes = await zs.generateUint8ArrayAsync();
|
|
218
|
+
mciContentFileZip.setContent(contentBytes);
|
|
219
|
+
mciContentFileZip.saveContent();
|
|
210
220
|
}
|
|
211
221
|
if (outputType !== ClUtils_1.OutputType.noReports) {
|
|
212
222
|
const csvFile = outputStorage.rootFolder.ensureFile(StorageUtilities_1.default.ensureFileNameIsSafe(StorageUtilities_1.default.getBaseFromName(projectSet.projectContainerName)) +
|
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.9.
|
|
5
|
+
version: "0.9.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/ContentIndex.js
CHANGED
|
@@ -31,6 +31,9 @@ var AnnotationCategory;
|
|
|
31
31
|
AnnotationCategory["itemTypeDependent"] = "i";
|
|
32
32
|
AnnotationCategory["itemComponentDependent"] = "j";
|
|
33
33
|
AnnotationCategory["itemTextureReferenceSource"] = "k";
|
|
34
|
+
AnnotationCategory["featureSource"] = "l";
|
|
35
|
+
AnnotationCategory["featureDependent"] = "m";
|
|
36
|
+
AnnotationCategory["featureRuleSource"] = "n";
|
|
34
37
|
AnnotationCategory["blockComponentDependentInPermutation"] = "p";
|
|
35
38
|
AnnotationCategory["storagePathDependent"] = "s";
|
|
36
39
|
AnnotationCategory["textureFile"] = "t";
|
package/core/Utilities.js
CHANGED
|
@@ -28,6 +28,22 @@ class Utilities {
|
|
|
28
28
|
}
|
|
29
29
|
return Utilities._isDebug;
|
|
30
30
|
}
|
|
31
|
+
static selectJsonObject(jsonO, select, ensureObjects) {
|
|
32
|
+
const selectors = select.split("/");
|
|
33
|
+
for (const selector of selectors) {
|
|
34
|
+
if (selector.length > 0) {
|
|
35
|
+
jsonO = jsonO[selector];
|
|
36
|
+
if (!jsonO && !ensureObjects) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (!jsonO && ensureObjects) {
|
|
40
|
+
jsonO[selector] = {};
|
|
41
|
+
jsonO = jsonO[selector];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return jsonO;
|
|
46
|
+
}
|
|
31
47
|
static removeItemInArray(objToRemove, stringArr) {
|
|
32
48
|
const nextArray = [];
|
|
33
49
|
for (const candStr of stringArr) {
|
|
@@ -233,6 +249,14 @@ class Utilities {
|
|
|
233
249
|
}
|
|
234
250
|
return Utilities.humanifyMinecraftName(val);
|
|
235
251
|
}
|
|
252
|
+
static ensureFirstCharIsUpperCase(name) {
|
|
253
|
+
if (name.length > 1) {
|
|
254
|
+
if (name[0] >= "a" && name[0] <= "z") {
|
|
255
|
+
name = name[0].toUpperCase() + name.substring(1, name.length);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return name;
|
|
259
|
+
}
|
|
236
260
|
static humanifyString(val, humanify) {
|
|
237
261
|
if (!humanify || val === undefined) {
|
|
238
262
|
return val;
|
|
@@ -254,6 +278,69 @@ class Utilities {
|
|
|
254
278
|
name = name.replace(/ /gi, "");
|
|
255
279
|
return name;
|
|
256
280
|
}
|
|
281
|
+
static sanitizeJavascriptName(name) {
|
|
282
|
+
name = name.trim();
|
|
283
|
+
name = name.replace(/</gi, "LessThan");
|
|
284
|
+
name = name.replace(/>/gi, "GreaterThan");
|
|
285
|
+
name = name.replace(/=/gi, "Equals");
|
|
286
|
+
name = name.replace(/!/gi, "Not");
|
|
287
|
+
name = name.replace(/\+/gi, "Plus");
|
|
288
|
+
name = name.replace(/,/gi, "");
|
|
289
|
+
name = name.replace(/-/gi, "");
|
|
290
|
+
name = name.replace(/\./gi, "");
|
|
291
|
+
name = name.replace(/'/gi, "");
|
|
292
|
+
name = name.replace(/ /gi, "");
|
|
293
|
+
name = name.replace(/\[/gi, "");
|
|
294
|
+
name = name.replace(/\]/gi, "");
|
|
295
|
+
name = name.replace(/"/gi, "");
|
|
296
|
+
name = name.replace(/\{/gi, "");
|
|
297
|
+
name = name.replace(/\}/gi, "");
|
|
298
|
+
name = name.replace(/</gi, "");
|
|
299
|
+
name = name.replace(/>/gi, "");
|
|
300
|
+
name = name.replace(/\*/gi, "");
|
|
301
|
+
name = name.replace(/\?/gi, "");
|
|
302
|
+
name = name.replace(/\\/gi, "");
|
|
303
|
+
name = name.replace(/\|/gi, "");
|
|
304
|
+
if (name.length > 0 && name[0] >= "0" && name[0] <= "9") {
|
|
305
|
+
name = "_" + name;
|
|
306
|
+
}
|
|
307
|
+
if (name.indexOf(":") >= 0) {
|
|
308
|
+
name = '"' + name + '"';
|
|
309
|
+
}
|
|
310
|
+
return name;
|
|
311
|
+
}
|
|
312
|
+
static javascriptifyName(name, capitalizeFrst) {
|
|
313
|
+
name = name.trim();
|
|
314
|
+
let retVal = "";
|
|
315
|
+
let capitalizeNext = capitalizeFrst === true;
|
|
316
|
+
for (let i = 0; i < name.length; i++) {
|
|
317
|
+
if (name[i] === " " ||
|
|
318
|
+
name[i] === "_" ||
|
|
319
|
+
name[i] === ":" ||
|
|
320
|
+
name[i] === "," ||
|
|
321
|
+
name[i] === "." ||
|
|
322
|
+
name[i] === '"' ||
|
|
323
|
+
name[i] === "'" ||
|
|
324
|
+
name[i] === "+" ||
|
|
325
|
+
name[i] === "-" ||
|
|
326
|
+
name[i] === ":" ||
|
|
327
|
+
name[i] === "[" ||
|
|
328
|
+
name[i] === "]") {
|
|
329
|
+
capitalizeNext = true;
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
if (capitalizeNext) {
|
|
333
|
+
retVal += name[i].toUpperCase();
|
|
334
|
+
capitalizeNext = false;
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
retVal += name[i];
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
retVal = this.sanitizeJavascriptName(retVal);
|
|
342
|
+
return retVal;
|
|
343
|
+
}
|
|
257
344
|
static humanifyMinecraftName(name) {
|
|
258
345
|
if (typeof name === "boolean" || typeof name === "number") {
|
|
259
346
|
return name.toString();
|
|
@@ -285,6 +372,13 @@ class Utilities {
|
|
|
285
372
|
}
|
|
286
373
|
name = name.replace(/::/gi, " ");
|
|
287
374
|
name = name.replace(/:/gi, " ");
|
|
375
|
+
name = name.replace("SharedTypes ", "");
|
|
376
|
+
if (name.startsWith("Struct ") || name.startsWith("struct ")) {
|
|
377
|
+
name = name.substring(7);
|
|
378
|
+
}
|
|
379
|
+
if ((name.startsWith("Enum ") || name.startsWith("enum ")) && name.indexOf("num_property") < 0) {
|
|
380
|
+
name = name.substring(5);
|
|
381
|
+
}
|
|
288
382
|
const lastPeriod = name.indexOf(".");
|
|
289
383
|
if (lastPeriod >= 4) {
|
|
290
384
|
name = name.substring(lastPeriod + 1) + " " + name.substring(0, lastPeriod);
|