How to detect when an item breaks?

Started by swelkinn_n on

Topic category: Help with modding (Java Edition)

Last seen on 23:20, 6. Apr 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect when an item breaks?

literally none of the other posts on this forum explain this (let alone working methods),

i just want to make my tool give the player a broken version of itself when it breaks

help,???

 

Last seen on 15:34, 1. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a new procedure : …
Sat, 04/30/2022 - 05:10

Create a new procedure :

(trigger) when a item is destroy

If item in the player hand is an [your item]

Set [your item broken] in the player hand

 

tell me if it doesn't work

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Global trigger : "Item is…
Sat, 04/30/2022 - 05:37

Global trigger : "Item is destroyed".

If [provided itemstack] = "your tool"

     If [item in main-hand] = [empty itemstack]  (hand should be empty, but verify just in case)

          Set item in main-hand of [event/target entity] to "broken item"

          Copy NBT tags of [provided itemstack] onto [item in main-hand]

Last seen on 17:58, 19. Apr 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i want to make something…
Wed, 11/15/2023 - 14:21

i want to make something similar to this, so could you show an image of the procedure?

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hum that thing wont work…
Fri, 12/08/2023 - 10:56

hum that thing wont work valirane, (2023.3) what you mean by NBTs there? is that part really necessary just for replace the item? i use my item, damage it until it destroy, but the second item (empty item) wont spawn on player main-hand

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(trigger) when a item is…
Fri, 12/08/2023 - 10:59

(trigger) when a item is destroy

If item in the player hand is an [your item] <-- this prb wont work because the item will be already gone when you fire that condition