Replace an item and keep nbts from the old one

Started by HVDES on

Topic category: Help with modding (Java Edition)

Last seen on 06:47, 22. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Replace an item and keep nbts from the old one

i wan't to make a sword that when you right click, it changes to a stronger one, the problem is that this give you a new sword, but i want to keep the first sword damage and enchantments, anyone can help me with that?

Last seen on 23:24, 3. Sep 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
in items theres a block like…
Sat, 08/24/2024 - 22:13

in items theres a block like this

Copy properties of <item> onto <item> (if it has any)


idk if it works but u can try it