Making an tool transform into an other tool

Started by misterspace on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making an tool transform into an other tool

Hey there. So I am making a mod that has an axe that can transform into a different tool with a rightclick. I have already figured out I have to make two different tools and all. And I can make it "transform" but It does not keep the durability or the enchantments. How do I copy the enchantment and durability of a tool or an item. here is what I have that doesn't work

Event trigger

Copy data components of (Item in main-hand of  Event/target entity) onto (get itemstack Local:dataaxe)

Set item in main hand of Event/target entity to (1) (axe)

Copy data components of (get itemstack Local:dataaxe) onto (Item in main-hand of  Event/target entity)