Making tool break after 1 use/mob kill

Started by L6PD on

Topic category: Help with MCreator software

Last seen on 11:07, 24. Dec 2020
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making tool break after 1 use/mob kill

Hi, I've been trying for a while now and can't seem to find out how to make tools and weapons break after 1 use.
I have set "number of uses / durability" to 1 but this makes the item have 2 uses/break 2 blocks. It will take the durability down to basically nothing but doesn't break and only breaks if I use it again. 
I have looked at the code but I'm still learning java so I don't know what I would be looking for or what to add if needed.

Any help would be great. Thanks

(sorry if I don't reply quickly I'm tired an maybe sleeping for the next 12 hours lol)

Last seen on 05:02, 20. Dec 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey! For the weapons, You…
Thu, 12/24/2020 - 02:23

Hey! For the weapons, You will need to make a procedure in the "When living entity is hit with tool" In that procedure add "Deal [Blank] amount of damage to [Provided Itemstack]" set the 0 to 1000 and then the tool will break. With a tool (Anything other than a hoe) Make a procedure in "When block destroyed with tool" and do the same thing. (Deal [Blank] amount of damage to [Provided Itemstack]). Lastly with the hoe, Do the same thing again on "When right clicked on on block". I hope this help you with your mod! 

Last seen on 11:07, 24. Dec 2020
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks a lot! I was being…
Thu, 12/24/2020 - 06:12

Thanks a lot! I was being stupid and setting the item as what to do damage to not the itemstack as I'm still new to all this and thought that was a placeholder for something you had to switch out.

Now I can continue with my dumb mod! Yay!