Started by
woodcreatures
on
Topic category: Help with Minecraft modding (Java Edition)
I have my custom trident, the problem is that anytime I throw it, when I pick it up again then the durability is resetted so basically my trident will never break
Anyone cah give a full procedure in order to keep save the item durability ? So when I throw it and pick it up again then the item will be not new
Make a number nbt/data/property on your trident item. On thrown ie spawned the trident entity/projectile, apply that number onto the entity as an nbt. When picked back up again get the nbt number from the entity and apply it to the item as it is given. During throwing/spawning you can remove durability if necessary.
If the procedures are not connected then use a player variable to record the number between picking up the trident and giving the new one. And then reset it.
Here is complicated since you have 2 different ones, Item and Projectile
You throw the item but the projectile is actually thrown and then you re pick up the item
Would you please send a screenshot for the above procedure ?
Show me how you do your current trident procedures, a projectile is an entity
have no idea at all, Im stucked
Give me some clear hints please
anyone can help here ?
I could really use that too, can anyone give a way to do it (procedure(s) or custom code) ??