How can I add a returnable item when an item is broken?

Started by CookUpAStorm on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Jul 2020
Points:
665

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
How can I add a returnable item when an item is broken?

I am so close to finishing my painted blocks mod, but there is one hurdle in my way. Is there any possible way to add a returnable item to the players inventory once a certain item is broken. For example I have made a paint tool in which when the paint runs out I want the bucket to be reusable. I haven't really found a suitable procedure for this. I tested the 2020.4 snapshot and tried the 'when item destroyed' trigger, but that doesn't work for me as it's global. So please if anyone knows a method (e.g. ideally a procedure, or custom code) please let me know. Thanks :)

Active 3 years ago
Joined Jul 2020
Points:
665

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
I figured it out now, no…
Wed, 07/29/2020 - 09:04

I figured it out now, no need for answer

Active 1 year ago
Joined Jun 2019
Points:
669

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Hey! Can I just ask how to…
Sun, 11/22/2020 - 10:39

Hey! Can I just ask how to do this? I have searched other posts and I haven't found anything. I'm working on a sword that has an emerald in it, which makes it slightly better, but once its broken the diamond sword drops.