Started by
amogus6116
on
Topic category: Help with Minecraft modding (Java Edition)
I've made a projectile, and attached that to an item with ranged properties. It's basically like a snowball, but when it hits anything, it returns (teleports) back to your hand.
Now, is it possible to make this item lose durability every time it returns to me? Obviously just lowering the durability is easy, but how would I save it's durability for the next time it'll be shot and return? Is there a way to save that?
For more clearance:
Item > Projectile Entity > (Newly generated) Same Item
It isn't perfect, but you could try using a variable. When it is thrown, have a variable decrease by one. When the player gets the new item, set it to that.