How to give a certain item when a tool breaks?

Started by CrossRaznic on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to give a certain item when a tool breaks?

So I'm making a gun mod where a pistol uses a magazine and bullets to reload the magazine.

I finished making the reloading mechanism, but I have a problem when I use all of the magazine durability (when it uses a bullet it uses 1 durability) it breaks, and I have 1 full magazine item and a empty magazine item.

I tried to make a procedure when item broken it gives the empty magazine, but it gives a magazine when a random item is broken.

Please help.