[solution found] custom tool durability draining while in creative mode

Started by MelodyAutumn on

Topic category: Troubleshooting, bugs, and solutions

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[solution found] custom tool durability draining while in creative mode
Sun, 07/16/2023 - 06:31 (edited)

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
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just tested it on one of…
Sat, 07/15/2023 - 19:08

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.

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For a sword/damage type tool:
Sat, 07/15/2023 - 19:11

For a sword/damage type tool:

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would also need to add…
Sat, 07/15/2023 - 19:14

You would also need to add to the if statement the tool, like "if item in main hand of source entity = custom.item" do...