A
Admincraft•6mo ago
SarUK

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 🙂
1 Reply
Admincraft Meta
Admincraft Meta•6mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by sarryuk#0

Did you find this page helpful?