製作一個能在Minecraft中共享進度的資料包
首先
Minecraftの全進捗解除をサバイバルで目指す有名実況者を見て、これを「自分でもしてみたい!」と思う方はたくさんいるでしょう。けれど1人でするのは辛いので、マルチプレイで、全進捗解除を目指したいと考えている方も居るでしょう。私もその1人でした。
そこで今回は、マルチプレイ中に、「誰か1人でも進捗を達成したら、その進捗は全員が達成したことにする」データパックを作っていこうと思います。
创建用于共享进度的单一命令。
在Minecraft命令中,最常用的命令是什么呢?正确答案是execute命令(不接受异议)。所以,我们可以创建一个命令来实现以下功能:“如果有人达成了某个成就,就利用命令让所有未达成该成就的人也达成它”(例如,成就为minecraft:story/iron_tools)。
/execute if entity @a[advancements={story/iron_tools=true}] run advancement grant @a[advancements={story/iron_tools=false}] only story/iron_tools
这个是根据这个网站进行参考制作的。
创建一个用于共享所有进展的命令。
如果将上述命令输入到重复命令方块中,就可以共享一个进度。但是由于只能共享一个进度,所以需要生成关于所有进度的相似命令。幸运的是,Minecraft的进度ID在这个页面上已经公开了。
当我们仔细观察该进展ID时,可以发现它属于以下的命名空间。
進捗のタブIDの名前空間Minecraft
story/
ネザーnether/
ジ・エンドend/
冒険adventure/
農業husbandry/
因此,我们将使用JavaScript来提取所有的进度ID,并将其格式化为命令的形式。
document.documentElement.innerHTML="<code style='white-space: nowrap;'>"+Array.from(document.getElementsByTagName("code")).filter(e=>!!e.innerText.match(/^(story\/|nether\/|end\/|adventure\/|husbandry\/)/)).map(e=>"execute if entity @a[advancements={"+e.innerText+"=true}] run advancement grant @a[advancements={"+e.innerText+"=false}] only "+e.innerText).join("<br>")+"</code>"
然后,将生成共享所有进展的一系列命令。
2023/06/18時点での生成結果main.mcfunction
execute if entity @a[advancements={story/root=true}] run advancement grant @a[advancements={story/root=false}] only story/root
execute if entity @a[advancements={story/mine_stone=true}] run advancement grant @a[advancements={story/mine_stone=false}] only story/mine_stone
execute if entity @a[advancements={story/upgrade_tools=true}] run advancement grant @a[advancements={story/upgrade_tools=false}] only story/upgrade_tools
execute if entity @a[advancements={story/smelt_iron=true}] run advancement grant @a[advancements={story/smelt_iron=false}] only story/smelt_iron
execute if entity @a[advancements={story/obtain_armor=true}] run advancement grant @a[advancements={story/obtain_armor=false}] only story/obtain_armor
execute if entity @a[advancements={story/lava_bucket=true}] run advancement grant @a[advancements={story/lava_bucket=false}] only story/lava_bucket
execute if entity @a[advancements={story/iron_tools=true}] run advancement grant @a[advancements={story/iron_tools=false}] only story/iron_tools
execute if entity @a[advancements={story/deflect_arrow=true}] run advancement grant @a[advancements={story/deflect_arrow=false}] only story/deflect_arrow
execute if entity @a[advancements={story/form_obsidian=true}] run advancement grant @a[advancements={story/form_obsidian=false}] only story/form_obsidian
execute if entity @a[advancements={story/mine_diamond=true}] run advancement grant @a[advancements={story/mine_diamond=false}] only story/mine_diamond
execute if entity @a[advancements={story/enter_the_nether=true}] run advancement grant @a[advancements={story/enter_the_nether=false}] only story/enter_the_nether
execute if entity @a[advancements={story/shiny_gear=true}] run advancement grant @a[advancements={story/shiny_gear=false}] only story/shiny_gear
execute if entity @a[advancements={story/enchant_item=true}] run advancement grant @a[advancements={story/enchant_item=false}] only story/enchant_item
execute if entity @a[advancements={story/cure_zombie_villager=true}] run advancement grant @a[advancements={story/cure_zombie_villager=false}] only story/cure_zombie_villager
execute if entity @a[advancements={story/follow_ender_eye=true}] run advancement grant @a[advancements={story/follow_ender_eye=false}] only story/follow_ender_eye
execute if entity @a[advancements={story/enter_the_end=true}] run advancement grant @a[advancements={story/enter_the_end=false}] only story/enter_the_end
execute if entity @a[advancements={nether/root=true}] run advancement grant @a[advancements={nether/root=false}] only nether/root
execute if entity @a[advancements={nether/return_to_sender=true}] run advancement grant @a[advancements={nether/return_to_sender=false}] only nether/return_to_sender
execute if entity @a[advancements={nether/find_bastion=true}] run advancement grant @a[advancements={nether/find_bastion=false}] only nether/find_bastion
execute if entity @a[advancements={nether/obtain_ancient_debris=true}] run advancement grant @a[advancements={nether/obtain_ancient_debris=false}] only nether/obtain_ancient_debris
execute if entity @a[advancements={nether/fast_travel=true}] run advancement grant @a[advancements={nether/fast_travel=false}] only nether/fast_travel
execute if entity @a[advancements={nether/find_fortress=true}] run advancement grant @a[advancements={nether/find_fortress=false}] only nether/find_fortress
execute if entity @a[advancements={nether/obtain_crying_obsidian=true}] run advancement grant @a[advancements={nether/obtain_crying_obsidian=false}] only nether/obtain_crying_obsidian
execute if entity @a[advancements={nether/distract_piglin=true}] run advancement grant @a[advancements={nether/distract_piglin=false}] only nether/distract_piglin
execute if entity @a[advancements={nether/ride_strider=true}] run advancement grant @a[advancements={nether/ride_strider=false}] only nether/ride_strider
execute if entity @a[advancements={nether/uneasy_alliance=true}] run advancement grant @a[advancements={nether/uneasy_alliance=false}] only nether/uneasy_alliance
execute if entity @a[advancements={nether/loot_bastion=true}] run advancement grant @a[advancements={nether/loot_bastion=false}] only nether/loot_bastion
execute if entity @a[advancements={nether/use_lodestone=true}] run advancement grant @a[advancements={nether/use_lodestone=false}] only nether/use_lodestone
execute if entity @a[advancements={nether/netherite_armor=true}] run advancement grant @a[advancements={nether/netherite_armor=false}] only nether/netherite_armor
execute if entity @a[advancements={nether/get_wither_skull=true}] run advancement grant @a[advancements={nether/get_wither_skull=false}] only nether/get_wither_skull
execute if entity @a[advancements={nether/obtain_blaze_rod=true}] run advancement grant @a[advancements={nether/obtain_blaze_rod=false}] only nether/obtain_blaze_rod
execute if entity @a[advancements={nether/charge_respawn_anchor=true}] run advancement grant @a[advancements={nether/charge_respawn_anchor=false}] only nether/charge_respawn_anchor
execute if entity @a[advancements={nether/ride_strider_in_overworld_lava=true}] run advancement grant @a[advancements={nether/ride_strider_in_overworld_lava=false}] only nether/ride_strider_in_overworld_lava
execute if entity @a[advancements={nether/explore_nether=true}] run advancement grant @a[advancements={nether/explore_nether=false}] only nether/explore_nether
execute if entity @a[advancements={nether/summon_wither=true}] run advancement grant @a[advancements={nether/summon_wither=false}] only nether/summon_wither
execute if entity @a[advancements={nether/brew_potion=true}] run advancement grant @a[advancements={nether/brew_potion=false}] only nether/brew_potion
execute if entity @a[advancements={nether/create_beacon=true}] run advancement grant @a[advancements={nether/create_beacon=false}] only nether/create_beacon
execute if entity @a[advancements={nether/all_potions=true}] run advancement grant @a[advancements={nether/all_potions=false}] only nether/all_potions
execute if entity @a[advancements={nether/create_full_beacon=true}] run advancement grant @a[advancements={nether/create_full_beacon=false}] only nether/create_full_beacon
execute if entity @a[advancements={nether/all_effects=true}] run advancement grant @a[advancements={nether/all_effects=false}] only nether/all_effects
execute if entity @a[advancements={end/root=true}] run advancement grant @a[advancements={end/root=false}] only end/root
execute if entity @a[advancements={end/kill_dragon=true}] run advancement grant @a[advancements={end/kill_dragon=false}] only end/kill_dragon
execute if entity @a[advancements={end/dragon_egg=true}] run advancement grant @a[advancements={end/dragon_egg=false}] only end/dragon_egg
execute if entity @a[advancements={end/enter_end_gateway=true}] run advancement grant @a[advancements={end/enter_end_gateway=false}] only end/enter_end_gateway
execute if entity @a[advancements={end/respawn_dragon=true}] run advancement grant @a[advancements={end/respawn_dragon=false}] only end/respawn_dragon
execute if entity @a[advancements={end/dragon_breath=true}] run advancement grant @a[advancements={end/dragon_breath=false}] only end/dragon_breath
execute if entity @a[advancements={end/find_end_city=true}] run advancement grant @a[advancements={end/find_end_city=false}] only end/find_end_city
execute if entity @a[advancements={end/elytra=true}] run advancement grant @a[advancements={end/elytra=false}] only end/elytra
execute if entity @a[advancements={end/levitate=true}] run advancement grant @a[advancements={end/levitate=false}] only end/levitate
execute if entity @a[advancements={adventure/root=true}] run advancement grant @a[advancements={adventure/root=false}] only adventure/root
execute if entity @a[advancements={adventure/voluntary_exile=true}] run advancement grant @a[advancements={adventure/voluntary_exile=false}] only adventure/voluntary_exile
execute if entity @a[advancements={adventure/spyglass_at_parrot=true}] run advancement grant @a[advancements={adventure/spyglass_at_parrot=false}] only adventure/spyglass_at_parrot
execute if entity @a[advancements={adventure/kill_a_mob=true}] run advancement grant @a[advancements={adventure/kill_a_mob=false}] only adventure/kill_a_mob
execute if entity @a[advancements={adventure/read_power_from_chiseled_bookshelf=true}] run advancement grant @a[advancements={adventure/read_power_from_chiseled_bookshelf=false}] only adventure/read_power_from_chiseled_bookshelf
execute if entity @a[advancements={adventure/trade=true}] run advancement grant @a[advancements={adventure/trade=false}] only adventure/trade
execute if entity @a[advancements={adventure/trim_with_any_armor_pattern=true}] run advancement grant @a[advancements={adventure/trim_with_any_armor_pattern=false}] only adventure/trim_with_any_armor_pattern
execute if entity @a[advancements={adventure/honey_block_slide=true}] run advancement grant @a[advancements={adventure/honey_block_slide=false}] only adventure/honey_block_slide
execute if entity @a[advancements={adventure/ol_besty=true}] run advancement grant @a[advancements={adventure/ol_besty=false}] only adventure/ol_besty
execute if entity @a[advancements={adventure/lightning_rod_with_villager_no_fire=true}] run advancement grant @a[advancements={adventure/lightning_rod_with_villager_no_fire=false}] only adventure/lightning_rod_with_villager_no_fire
execute if entity @a[advancements={adventure/kill_mob_near_sculk_catalyst=true}] run advancement grant @a[advancements={adventure/kill_mob_near_sculk_catalyst=false}] only adventure/kill_mob_near_sculk_catalyst
execute if entity @a[advancements={adventure/fall_from_world_height=true}] run advancement grant @a[advancements={adventure/fall_from_world_height=false}] only adventure/fall_from_world_height
execute if entity @a[advancements={adventure/salvage_sherd=true}] run advancement grant @a[advancements={adventure/salvage_sherd=false}] only adventure/salvage_sherd
execute if entity @a[advancements={adventure/avoid_vibration=true}] run advancement grant @a[advancements={adventure/avoid_vibration=false}] only adventure/avoid_vibration
execute if entity @a[advancements={adventure/sleep_in_bed=true}] run advancement grant @a[advancements={adventure/sleep_in_bed=false}] only adventure/sleep_in_bed
execute if entity @a[advancements={adventure/hero_of_the_village=true}] run advancement grant @a[advancements={adventure/hero_of_the_village=false}] only adventure/hero_of_the_village
execute if entity @a[advancements={adventure/spyglass_at_ghast=true}] run advancement grant @a[advancements={adventure/spyglass_at_ghast=false}] only adventure/spyglass_at_ghast
execute if entity @a[advancements={adventure/throw_trident=true}] run advancement grant @a[advancements={adventure/throw_trident=false}] only adventure/throw_trident
execute if entity @a[advancements={adventure/shoot_arrow=true}] run advancement grant @a[advancements={adventure/shoot_arrow=false}] only adventure/shoot_arrow
execute if entity @a[advancements={adventure/kill_all_mobs=true}] run advancement grant @a[advancements={adventure/kill_all_mobs=false}] only adventure/kill_all_mobs
execute if entity @a[advancements={adventure/totem_of_undying=true}] run advancement grant @a[advancements={adventure/totem_of_undying=false}] only adventure/totem_of_undying
execute if entity @a[advancements={adventure/summon_iron_golem=true}] run advancement grant @a[advancements={adventure/summon_iron_golem=false}] only adventure/summon_iron_golem
execute if entity @a[advancements={adventure/trade_at_world_height=true}] run advancement grant @a[advancements={adventure/trade_at_world_height=false}] only adventure/trade_at_world_height
execute if entity @a[advancements={adventure/trim_with_all_exclusive_armor_patterns=true}] run advancement grant @a[advancements={adventure/trim_with_all_exclusive_armor_patterns=false}] only adventure/trim_with_all_exclusive_armor_patterns
execute if entity @a[advancements={adventure/two_birds_one_arrow=true}] run advancement grant @a[advancements={adventure/two_birds_one_arrow=false}] only adventure/two_birds_one_arrow
execute if entity @a[advancements={adventure/whos_the_pillager_now=true}] run advancement grant @a[advancements={adventure/whos_the_pillager_now=false}] only adventure/whos_the_pillager_now
execute if entity @a[advancements={adventure/arbalistic=true}] run advancement grant @a[advancements={adventure/arbalistic=false}] only adventure/arbalistic
execute if entity @a[advancements={adventure/craft_decorated_pot_using_only_sherds=true}] run advancement grant @a[advancements={adventure/craft_decorated_pot_using_only_sherds=false}] only adventure/craft_decorated_pot_using_only_sherds
execute if entity @a[advancements={adventure/adventuring_time=true}] run advancement grant @a[advancements={adventure/adventuring_time=false}] only adventure/adventuring_time
execute if entity @a[advancements={adventure/play_jukebox_in_meadows=true}] run advancement grant @a[advancements={adventure/play_jukebox_in_meadows=false}] only adventure/play_jukebox_in_meadows
execute if entity @a[advancements={adventure/walk_on_powder_snow_with_leather_boots=true}] run advancement grant @a[advancements={adventure/walk_on_powder_snow_with_leather_boots=false}] only adventure/walk_on_powder_snow_with_leather_boots
execute if entity @a[advancements={adventure/spyglass_at_dragon=true}] run advancement grant @a[advancements={adventure/spyglass_at_dragon=false}] only adventure/spyglass_at_dragon
execute if entity @a[advancements={adventure/very_very_frightening=true}] run advancement grant @a[advancements={adventure/very_very_frightening=false}] only adventure/very_very_frightening
execute if entity @a[advancements={adventure/sniper_duel=true}] run advancement grant @a[advancements={adventure/sniper_duel=false}] only adventure/sniper_duel
execute if entity @a[advancements={adventure/bullseye=true}] run advancement grant @a[advancements={adventure/bullseye=false}] only adventure/bullseye
execute if entity @a[advancements={husbandry/root=true}] run advancement grant @a[advancements={husbandry/root=false}] only husbandry/root
execute if entity @a[advancements={husbandry/safely_harvest_honey=true}] run advancement grant @a[advancements={husbandry/safely_harvest_honey=false}] only husbandry/safely_harvest_honey
execute if entity @a[advancements={husbandry/breed_an_animal=true}] run advancement grant @a[advancements={husbandry/breed_an_animal=false}] only husbandry/breed_an_animal
execute if entity @a[advancements={husbandry/allay_deliver_item_to_player=true}] run advancement grant @a[advancements={husbandry/allay_deliver_item_to_player=false}] only husbandry/allay_deliver_item_to_player
execute if entity @a[advancements={husbandry/ride_a_boat_with_a_goat=true}] run advancement grant @a[advancements={husbandry/ride_a_boat_with_a_goat=false}] only husbandry/ride_a_boat_with_a_goat
execute if entity @a[advancements={husbandry/tame_an_animal=true}] run advancement grant @a[advancements={husbandry/tame_an_animal=false}] only husbandry/tame_an_animal
execute if entity @a[advancements={husbandry/make_a_sign_glow=true}] run advancement grant @a[advancements={husbandry/make_a_sign_glow=false}] only husbandry/make_a_sign_glow
execute if entity @a[advancements={husbandry/fishy_business=true}] run advancement grant @a[advancements={husbandry/fishy_business=false}] only husbandry/fishy_business
execute if entity @a[advancements={husbandry/silk_touch_nest=true}] run advancement grant @a[advancements={husbandry/silk_touch_nest=false}] only husbandry/silk_touch_nest
execute if entity @a[advancements={husbandry/tadpole_in_a_bucket=true}] run advancement grant @a[advancements={husbandry/tadpole_in_a_bucket=false}] only husbandry/tadpole_in_a_bucket
execute if entity @a[advancements={husbandry/obtain_sniffer_egg=true}] run advancement grant @a[advancements={husbandry/obtain_sniffer_egg=false}] only husbandry/obtain_sniffer_egg
execute if entity @a[advancements={husbandry/plant_seed=true}] run advancement grant @a[advancements={husbandry/plant_seed=false}] only husbandry/plant_seed
execute if entity @a[advancements={husbandry/wax_on=true}] run advancement grant @a[advancements={husbandry/wax_on=false}] only husbandry/wax_on
execute if entity @a[advancements={husbandry/bred_all_animals=true}] run advancement grant @a[advancements={husbandry/bred_all_animals=false}] only husbandry/bred_all_animals
execute if entity @a[advancements={husbandry/allay_deliver_cake_to_note_block=true}] run advancement grant @a[advancements={husbandry/allay_deliver_cake_to_note_block=false}] only husbandry/allay_deliver_cake_to_note_block
execute if entity @a[advancements={husbandry/complete_catalogue=true}] run advancement grant @a[advancements={husbandry/complete_catalogue=false}] only husbandry/complete_catalogue
execute if entity @a[advancements={husbandry/tactical_fishing=true}] run advancement grant @a[advancements={husbandry/tactical_fishing=false}] only husbandry/tactical_fishing
execute if entity @a[advancements={husbandry/leash_all_frog_variants=true}] run advancement grant @a[advancements={husbandry/leash_all_frog_variants=false}] only husbandry/leash_all_frog_variants
execute if entity @a[advancements={husbandry/feed_snifflet=true}] run advancement grant @a[advancements={husbandry/feed_snifflet=false}] only husbandry/feed_snifflet
execute if entity @a[advancements={husbandry/balanced_diet=true}] run advancement grant @a[advancements={husbandry/balanced_diet=false}] only husbandry/balanced_diet
execute if entity @a[advancements={husbandry/break_netherite_hoe=true}] run advancement grant @a[advancements={husbandry/break_netherite_hoe=false}] only husbandry/break_netherite_hoe
execute if entity @a[advancements={husbandry/wax_off=true}] run advancement grant @a[advancements={husbandry/wax_off=false}] only husbandry/wax_off
execute if entity @a[advancements={husbandry/froglights=true}] run advancement grant @a[advancements={husbandry/froglights=false}] only husbandry/froglights
execute if entity @a[advancements={husbandry/plant_any_sniffer_seed=true}] run advancement grant @a[advancements={husbandry/plant_any_sniffer_seed=false}] only husbandry/plant_any_sniffer_seed
execute if entity @a[advancements={husbandry/axolotl_in_a_bucket=true}] run advancement grant @a[advancements={husbandry/axolotl_in_a_bucket=false}] only husbandry/axolotl_in_a_bucket
execute if entity @a[advancements={husbandry/kill_axolotl_target=true}] run advancement grant @a[advancements={husbandry/kill_axolotl_target=false}] only husbandry/kill_axolotl_target
execute if entity @a[advancements={story/root=true}] run advancement grant @a[advancements={story/root=false}] only story/root
execute if entity @a[advancements={story/mine_stone=true}] run advancement grant @a[advancements={story/mine_stone=false}] only story/mine_stone
execute if entity @a[advancements={story/upgrade_tools=true}] run advancement grant @a[advancements={story/upgrade_tools=false}] only story/upgrade_tools
execute if entity @a[advancements={story/smelt_iron=true}] run advancement grant @a[advancements={story/smelt_iron=false}] only story/smelt_iron
execute if entity @a[advancements={story/obtain_armor=true}] run advancement grant @a[advancements={story/obtain_armor=false}] only story/obtain_armor
execute if entity @a[advancements={story/lava_bucket=true}] run advancement grant @a[advancements={story/lava_bucket=false}] only story/lava_bucket
execute if entity @a[advancements={story/iron_tools=true}] run advancement grant @a[advancements={story/iron_tools=false}] only story/iron_tools
execute if entity @a[advancements={story/deflect_arrow=true}] run advancement grant @a[advancements={story/deflect_arrow=false}] only story/deflect_arrow
execute if entity @a[advancements={story/form_obsidian=true}] run advancement grant @a[advancements={story/form_obsidian=false}] only story/form_obsidian
execute if entity @a[advancements={story/mine_diamond=true}] run advancement grant @a[advancements={story/mine_diamond=false}] only story/mine_diamond
execute if entity @a[advancements={story/enter_the_nether=true}] run advancement grant @a[advancements={story/enter_the_nether=false}] only story/enter_the_nether
execute if entity @a[advancements={story/shiny_gear=true}] run advancement grant @a[advancements={story/shiny_gear=false}] only story/shiny_gear
execute if entity @a[advancements={story/enchant_item=true}] run advancement grant @a[advancements={story/enchant_item=false}] only story/enchant_item
execute if entity @a[advancements={story/cure_zombie_villager=true}] run advancement grant @a[advancements={story/cure_zombie_villager=false}] only story/cure_zombie_villager
execute if entity @a[advancements={story/follow_ender_eye=true}] run advancement grant @a[advancements={story/follow_ender_eye=false}] only story/follow_ender_eye
execute if entity @a[advancements={story/enter_the_end=true}] run advancement grant @a[advancements={story/enter_the_end=false}] only story/enter_the_end
execute if entity @a[advancements={nether/root=true}] run advancement grant @a[advancements={nether/root=false}] only nether/root
execute if entity @a[advancements={nether/return_to_sender=true}] run advancement grant @a[advancements={nether/return_to_sender=false}] only nether/return_to_sender
execute if entity @a[advancements={nether/find_bastion=true}] run advancement grant @a[advancements={nether/find_bastion=false}] only nether/find_bastion
execute if entity @a[advancements={nether/obtain_ancient_debris=true}] run advancement grant @a[advancements={nether/obtain_ancient_debris=false}] only nether/obtain_ancient_debris
execute if entity @a[advancements={nether/fast_travel=true}] run advancement grant @a[advancements={nether/fast_travel=false}] only nether/fast_travel
execute if entity @a[advancements={nether/find_fortress=true}] run advancement grant @a[advancements={nether/find_fortress=false}] only nether/find_fortress
execute if entity @a[advancements={nether/obtain_crying_obsidian=true}] run advancement grant @a[advancements={nether/obtain_crying_obsidian=false}] only nether/obtain_crying_obsidian
execute if entity @a[advancements={nether/distract_piglin=true}] run advancement grant @a[advancements={nether/distract_piglin=false}] only nether/distract_piglin
execute if entity @a[advancements={nether/ride_strider=true}] run advancement grant @a[advancements={nether/ride_strider=false}] only nether/ride_strider
execute if entity @a[advancements={nether/uneasy_alliance=true}] run advancement grant @a[advancements={nether/uneasy_alliance=false}] only nether/uneasy_alliance
execute if entity @a[advancements={nether/loot_bastion=true}] run advancement grant @a[advancements={nether/loot_bastion=false}] only nether/loot_bastion
execute if entity @a[advancements={nether/use_lodestone=true}] run advancement grant @a[advancements={nether/use_lodestone=false}] only nether/use_lodestone
execute if entity @a[advancements={nether/netherite_armor=true}] run advancement grant @a[advancements={nether/netherite_armor=false}] only nether/netherite_armor
execute if entity @a[advancements={nether/get_wither_skull=true}] run advancement grant @a[advancements={nether/get_wither_skull=false}] only nether/get_wither_skull
execute if entity @a[advancements={nether/obtain_blaze_rod=true}] run advancement grant @a[advancements={nether/obtain_blaze_rod=false}] only nether/obtain_blaze_rod
execute if entity @a[advancements={nether/charge_respawn_anchor=true}] run advancement grant @a[advancements={nether/charge_respawn_anchor=false}] only nether/charge_respawn_anchor
execute if entity @a[advancements={nether/ride_strider_in_overworld_lava=true}] run advancement grant @a[advancements={nether/ride_strider_in_overworld_lava=false}] only nether/ride_strider_in_overworld_lava
execute if entity @a[advancements={nether/explore_nether=true}] run advancement grant @a[advancements={nether/explore_nether=false}] only nether/explore_nether
execute if entity @a[advancements={nether/summon_wither=true}] run advancement grant @a[advancements={nether/summon_wither=false}] only nether/summon_wither
execute if entity @a[advancements={nether/brew_potion=true}] run advancement grant @a[advancements={nether/brew_potion=false}] only nether/brew_potion
execute if entity @a[advancements={nether/create_beacon=true}] run advancement grant @a[advancements={nether/create_beacon=false}] only nether/create_beacon
execute if entity @a[advancements={nether/all_potions=true}] run advancement grant @a[advancements={nether/all_potions=false}] only nether/all_potions
execute if entity @a[advancements={nether/create_full_beacon=true}] run advancement grant @a[advancements={nether/create_full_beacon=false}] only nether/create_full_beacon
execute if entity @a[advancements={nether/all_effects=true}] run advancement grant @a[advancements={nether/all_effects=false}] only nether/all_effects
execute if entity @a[advancements={end/root=true}] run advancement grant @a[advancements={end/root=false}] only end/root
execute if entity @a[advancements={end/kill_dragon=true}] run advancement grant @a[advancements={end/kill_dragon=false}] only end/kill_dragon
execute if entity @a[advancements={end/dragon_egg=true}] run advancement grant @a[advancements={end/dragon_egg=false}] only end/dragon_egg
execute if entity @a[advancements={end/enter_end_gateway=true}] run advancement grant @a[advancements={end/enter_end_gateway=false}] only end/enter_end_gateway
execute if entity @a[advancements={end/respawn_dragon=true}] run advancement grant @a[advancements={end/respawn_dragon=false}] only end/respawn_dragon
execute if entity @a[advancements={end/dragon_breath=true}] run advancement grant @a[advancements={end/dragon_breath=false}] only end/dragon_breath
execute if entity @a[advancements={end/find_end_city=true}] run advancement grant @a[advancements={end/find_end_city=false}] only end/find_end_city
execute if entity @a[advancements={end/elytra=true}] run advancement grant @a[advancements={end/elytra=false}] only end/elytra
execute if entity @a[advancements={end/levitate=true}] run advancement grant @a[advancements={end/levitate=false}] only end/levitate
execute if entity @a[advancements={adventure/root=true}] run advancement grant @a[advancements={adventure/root=false}] only adventure/root
execute if entity @a[advancements={adventure/voluntary_exile=true}] run advancement grant @a[advancements={adventure/voluntary_exile=false}] only adventure/voluntary_exile
execute if entity @a[advancements={adventure/spyglass_at_parrot=true}] run advancement grant @a[advancements={adventure/spyglass_at_parrot=false}] only adventure/spyglass_at_parrot
execute if entity @a[advancements={adventure/kill_a_mob=true}] run advancement grant @a[advancements={adventure/kill_a_mob=false}] only adventure/kill_a_mob
execute if entity @a[advancements={adventure/read_power_from_chiseled_bookshelf=true}] run advancement grant @a[advancements={adventure/read_power_from_chiseled_bookshelf=false}] only adventure/read_power_from_chiseled_bookshelf
execute if entity @a[advancements={adventure/trade=true}] run advancement grant @a[advancements={adventure/trade=false}] only adventure/trade
execute if entity @a[advancements={adventure/trim_with_any_armor_pattern=true}] run advancement grant @a[advancements={adventure/trim_with_any_armor_pattern=false}] only adventure/trim_with_any_armor_pattern
execute if entity @a[advancements={adventure/honey_block_slide=true}] run advancement grant @a[advancements={adventure/honey_block_slide=false}] only adventure/honey_block_slide
execute if entity @a[advancements={adventure/ol_besty=true}] run advancement grant @a[advancements={adventure/ol_besty=false}] only adventure/ol_besty
execute if entity @a[advancements={adventure/lightning_rod_with_villager_no_fire=true}] run advancement grant @a[advancements={adventure/lightning_rod_with_villager_no_fire=false}] only adventure/lightning_rod_with_villager_no_fire
execute if entity @a[advancements={adventure/kill_mob_near_sculk_catalyst=true}] run advancement grant @a[advancements={adventure/kill_mob_near_sculk_catalyst=false}] only adventure/kill_mob_near_sculk_catalyst
execute if entity @a[advancements={adventure/fall_from_world_height=true}] run advancement grant @a[advancements={adventure/fall_from_world_height=false}] only adventure/fall_from_world_height
execute if entity @a[advancements={adventure/salvage_sherd=true}] run advancement grant @a[advancements={adventure/salvage_sherd=false}] only adventure/salvage_sherd
execute if entity @a[advancements={adventure/avoid_vibration=true}] run advancement grant @a[advancements={adventure/avoid_vibration=false}] only adventure/avoid_vibration
execute if entity @a[advancements={adventure/sleep_in_bed=true}] run advancement grant @a[advancements={adventure/sleep_in_bed=false}] only adventure/sleep_in_bed
execute if entity @a[advancements={adventure/hero_of_the_village=true}] run advancement grant @a[advancements={adventure/hero_of_the_village=false}] only adventure/hero_of_the_village
execute if entity @a[advancements={adventure/spyglass_at_ghast=true}] run advancement grant @a[advancements={adventure/spyglass_at_ghast=false}] only adventure/spyglass_at_ghast
execute if entity @a[advancements={adventure/throw_trident=true}] run advancement grant @a[advancements={adventure/throw_trident=false}] only adventure/throw_trident
execute if entity @a[advancements={adventure/shoot_arrow=true}] run advancement grant @a[advancements={adventure/shoot_arrow=false}] only adventure/shoot_arrow
execute if entity @a[advancements={adventure/kill_all_mobs=true}] run advancement grant @a[advancements={adventure/kill_all_mobs=false}] only adventure/kill_all_mobs
execute if entity @a[advancements={adventure/totem_of_undying=true}] run advancement grant @a[advancements={adventure/totem_of_undying=false}] only adventure/totem_of_undying
execute if entity @a[advancements={adventure/summon_iron_golem=true}] run advancement grant @a[advancements={adventure/summon_iron_golem=false}] only adventure/summon_iron_golem
execute if entity @a[advancements={adventure/trade_at_world_height=true}] run advancement grant @a[advancements={adventure/trade_at_world_height=false}] only adventure/trade_at_world_height
execute if entity @a[advancements={adventure/trim_with_all_exclusive_armor_patterns=true}] run advancement grant @a[advancements={adventure/trim_with_all_exclusive_armor_patterns=false}] only adventure/trim_with_all_exclusive_armor_patterns
execute if entity @a[advancements={adventure/two_birds_one_arrow=true}] run advancement grant @a[advancements={adventure/two_birds_one_arrow=false}] only adventure/two_birds_one_arrow
execute if entity @a[advancements={adventure/whos_the_pillager_now=true}] run advancement grant @a[advancements={adventure/whos_the_pillager_now=false}] only adventure/whos_the_pillager_now
execute if entity @a[advancements={adventure/arbalistic=true}] run advancement grant @a[advancements={adventure/arbalistic=false}] only adventure/arbalistic
execute if entity @a[advancements={adventure/craft_decorated_pot_using_only_sherds=true}] run advancement grant @a[advancements={adventure/craft_decorated_pot_using_only_sherds=false}] only adventure/craft_decorated_pot_using_only_sherds
execute if entity @a[advancements={adventure/adventuring_time=true}] run advancement grant @a[advancements={adventure/adventuring_time=false}] only adventure/adventuring_time
execute if entity @a[advancements={adventure/play_jukebox_in_meadows=true}] run advancement grant @a[advancements={adventure/play_jukebox_in_meadows=false}] only adventure/play_jukebox_in_meadows
execute if entity @a[advancements={adventure/walk_on_powder_snow_with_leather_boots=true}] run advancement grant @a[advancements={adventure/walk_on_powder_snow_with_leather_boots=false}] only adventure/walk_on_powder_snow_with_leather_boots
execute if entity @a[advancements={adventure/spyglass_at_dragon=true}] run advancement grant @a[advancements={adventure/spyglass_at_dragon=false}] only adventure/spyglass_at_dragon
execute if entity @a[advancements={adventure/very_very_frightening=true}] run advancement grant @a[advancements={adventure/very_very_frightening=false}] only adventure/very_very_frightening
execute if entity @a[advancements={adventure/sniper_duel=true}] run advancement grant @a[advancements={adventure/sniper_duel=false}] only adventure/sniper_duel
execute if entity @a[advancements={adventure/bullseye=true}] run advancement grant @a[advancements={adventure/bullseye=false}] only adventure/bullseye
execute if entity @a[advancements={husbandry/root=true}] run advancement grant @a[advancements={husbandry/root=false}] only husbandry/root
execute if entity @a[advancements={husbandry/safely_harvest_honey=true}] run advancement grant @a[advancements={husbandry/safely_harvest_honey=false}] only husbandry/safely_harvest_honey
execute if entity @a[advancements={husbandry/breed_an_animal=true}] run advancement grant @a[advancements={husbandry/breed_an_animal=false}] only husbandry/breed_an_animal
execute if entity @a[advancements={husbandry/allay_deliver_item_to_player=true}] run advancement grant @a[advancements={husbandry/allay_deliver_item_to_player=false}] only husbandry/allay_deliver_item_to_player
execute if entity @a[advancements={husbandry/ride_a_boat_with_a_goat=true}] run advancement grant @a[advancements={husbandry/ride_a_boat_with_a_goat=false}] only husbandry/ride_a_boat_with_a_goat
execute if entity @a[advancements={husbandry/tame_an_animal=true}] run advancement grant @a[advancements={husbandry/tame_an_animal=false}] only husbandry/tame_an_animal
execute if entity @a[advancements={husbandry/make_a_sign_glow=true}] run advancement grant @a[advancements={husbandry/make_a_sign_glow=false}] only husbandry/make_a_sign_glow
execute if entity @a[advancements={husbandry/fishy_business=true}] run advancement grant @a[advancements={husbandry/fishy_business=false}] only husbandry/fishy_business
execute if entity @a[advancements={husbandry/silk_touch_nest=true}] run advancement grant @a[advancements={husbandry/silk_touch_nest=false}] only husbandry/silk_touch_nest
execute if entity @a[advancements={husbandry/tadpole_in_a_bucket=true}] run advancement grant @a[advancements={husbandry/tadpole_in_a_bucket=false}] only husbandry/tadpole_in_a_bucket
execute if entity @a[advancements={husbandry/obtain_sniffer_egg=true}] run advancement grant @a[advancements={husbandry/obtain_sniffer_egg=false}] only husbandry/obtain_sniffer_egg
execute if entity @a[advancements={husbandry/plant_seed=true}] run advancement grant @a[advancements={husbandry/plant_seed=false}] only husbandry/plant_seed
execute if entity @a[advancements={husbandry/wax_on=true}] run advancement grant @a[advancements={husbandry/wax_on=false}] only husbandry/wax_on
execute if entity @a[advancements={husbandry/bred_all_animals=true}] run advancement grant @a[advancements={husbandry/bred_all_animals=false}] only husbandry/bred_all_animals
execute if entity @a[advancements={husbandry/allay_deliver_cake_to_note_block=true}] run advancement grant @a[advancements={husbandry/allay_deliver_cake_to_note_block=false}] only husbandry/allay_deliver_cake_to_note_block
execute if entity @a[advancements={husbandry/complete_catalogue=true}] run advancement grant @a[advancements={husbandry/complete_catalogue=false}] only husbandry/complete_catalogue
execute if entity @a[advancements={husbandry/tactical_fishing=true}] run advancement grant @a[advancements={husbandry/tactical_fishing=false}] only husbandry/tactical_fishing
execute if entity @a[advancements={husbandry/leash_all_frog_variants=true}] run advancement grant @a[advancements={husbandry/leash_all_frog_variants=false}] only husbandry/leash_all_frog_variants
execute if entity @a[advancements={husbandry/feed_snifflet=true}] run advancement grant @a[advancements={husbandry/feed_snifflet=false}] only husbandry/feed_snifflet
execute if entity @a[advancements={husbandry/balanced_diet=true}] run advancement grant @a[advancements={husbandry/balanced_diet=false}] only husbandry/balanced_diet
execute if entity @a[advancements={husbandry/break_netherite_hoe=true}] run advancement grant @a[advancements={husbandry/break_netherite_hoe=false}] only husbandry/break_netherite_hoe
execute if entity @a[advancements={husbandry/wax_off=true}] run advancement grant @a[advancements={husbandry/wax_off=false}] only husbandry/wax_off
execute if entity @a[advancements={husbandry/froglights=true}] run advancement grant @a[advancements={husbandry/froglights=false}] only husbandry/froglights
execute if entity @a[advancements={husbandry/plant_any_sniffer_seed=true}] run advancement grant @a[advancements={husbandry/plant_any_sniffer_seed=false}] only husbandry/plant_any_sniffer_seed
execute if entity @a[advancements={husbandry/axolotl_in_a_bucket=true}] run advancement grant @a[advancements={husbandry/axolotl_in_a_bucket=false}] only husbandry/axolotl_in_a_bucket
execute if entity @a[advancements={husbandry/kill_axolotl_target=true}] run advancement grant @a[advancements={husbandry/kill_axolotl_target=false}] only husbandry/kill_axolotl_target
将其转化为数据包
如果能做到这一点,剩下的就只剩将其打包成数据包。
.
└─ advance
├─ data
│ ├─ adv
│ │ └─ functions
│ │ └─ main.mcfunction
│ └─ minecraft
│ └─ tags
│ └─ functions
│ └─ tick.json
└─ pack.mcmeta
我们可以随意地按照这种感觉来组织文件夹。然后,我们可以将pack.mcmeta和tick.json以这种方式写入并保存起来。
{
"pack":{
"pack_format":15,
"description":"FUNCTIONS"
}
}
{
"values": ["adv:main"]
}
最后,只需将先前获得的“共享所有进度的命令集”粘贴到main.mcfunction中即可完成。
结束
玩Minecraft时,还能学会JavaScript,这是多么教育性的游戏啊。
请用多种选择性地用中文释义以下内容:
以上。-> 上述。