Started by
MelodyAutumn
on
Topic category: Troubleshooting, bugs, and solutions
hi! as the title says, my custom tools lose durability when used while in creative mode. i selected special as the tool type so maybe it's related to that? i'm not sure though
edit: found a solution, just check to see when the tool is used and give back the durability if the player is in creative mode
Edited by MelodyAutumn on Sun, 07/16/2023 - 06:31
I just tested it on one of my current tools. It seems like it is the special tool type being the issue. I would set up a global trigger for the items use (Player Uses Item, Player Breaks Block, etc.), and set up an if statement for if player in creative, cancel global trigger, and then set up the code to manually do whatever the original use is.
For a sword/damage type tool:
Image didn't post right:
https://imgur.com/a/EiYAgLZ
You would also need to add to the if statement the tool, like "if item in main hand of source entity = custom.item" do...