SarUK
SarUK
AAdmincraft
Created by SarUK on 8/1/2024 in #questions
weapon / tool repair shop - command blocks
I have set up an item repair shop on my semi-vanilla server with 2 command blocks, one that takes 10xp levels, and the pther that repairs the item dropped on the ground, is there a way to do this same process, but target the tool in the offhand? This is what I have at the moment, one command block, and the other chained Item Repair (dropped on ground) 1st Command block /xp add @p -10 levels 2nd chain Command block item modify entity @e[type=item,distance=..3] contents {"function":"minecraft:filtered","item_filter":{"predicates":{"minecraft:damage":{"damage":{"min":1}}}},"modifier":{"function":"minecraft:set_components","components":{"minecraft:damage":0}}} Wondering if I can incorporate either /execute if entity @p[nbt={Inventory:[{Slot:-106b}]}] or run item modify entity @e weapon.offhand contents but not intelligent enough to work this out it seems 🙂 Ideally want to achieve this without the need for a plugin 🙂
2 replies