Started by
Noxvern
on
Topic category: Help with Minecraft modding (Java Edition)
I want to do a wand and when you right click, the item in the shield-hand will be restored.
Can you guys help me to do that?
Just replacing the item or just changing the durability will be fine, but I don't know how to do it...
Edited by Noxvern on Sun, 09/05/2021 - 22:15
Replacing it with the same item is fine. Just like this https://imgur.com/v9ttWO0
There's a code block in the Item Procedures section labelled "Set damage of _ to _". Replace the Itemstack selector with "Get item in offhand" block, and set the number to 0, as this value is how much damage the item has received, so setting it to 0 should restore the item.
Thnx! Works like a charm~ :D