give_pickaxe.mcfunction 428 B

1234567
  1. clear @s netherite_pickaxe{game_item:1b}
  2. # 返还格子上的物品
  3. execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
  4. execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
  5. item replace entity @s hotbar.8 with minecraft:netherite_pickaxe{game_item:1b,display:{Name:'{"text":"镐","italic":false}'},Enchantments:[{id:"minecraft:efficiency",lvl:6s}]} 1