2023-12-16 22:31:42 +00:00

4 lines
716 B
MCFunction

#Check if wrench has been crafted
item replace entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{display:{Name:'"Wrench"'}}}}] weapon.mainhand with minecraft:carrot_on_a_stick{Wrench: 597832584, HideFlags: 1, display: {Lore: ['{"text":"Default"}'], Name: '{"italic":false,"text":"LZ\'s Wrench"}'}, Enchantments: [{lvl: 1s, id: "minecraft:unbreaking"}]}
item replace entity @s[nbt={Inventory:[{Slot:-106b, id:"minecraft:carrot_on_a_stick",tag:{display:{Name:'"Wrench"'}}}]}] weapon.offhand with minecraft:carrot_on_a_stick{Wrench: 597832584, HideFlags: 1, display: {Lore: ['{"text":"Default"}'], Name: '{"italic":false,"text":"LZ\'s Wrench"}'}, Enchantments: [{lvl: 1s, id: "minecraft:unbreaking"}]}