Need help with when item breaks

Started by Ender2010PL on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help with when item breaks

I am trying to make a Copper soword that oxydizes when breaks tho it doesnt work How I want it to.

I have made every stage of oxydition of it (copper_sword | exposed_copper_sword | weathered_copper_sword | oxydized_copper_sword)

Instead of giving the next stage of oxydition it gives the last. (when an exposed_copper_sword breaks it gives oxydized_copper_sword instead of weathered_copper_sword)


Procedure is set to when entity swings item and it looks like this:


IF [ Get Damage of Item in main hand == { Get max possible damage of Item in main hand - (1) } ]

do
      IF [ item in main chand == copper_sword ]

      do [ set item in main hand of { event/targed entity } to (1) { exposed_copper_sword } ]

      If statement end

      IF [ item in main chand == exposed_copper_sword ]

      do [ set item in main hand of { event/targed entity } to (1) { weathered_copper_sword } ]

      If statement end

      IF [ item in main chand == weathered_copper_sword ]

      do [ set item in main hand of { event/targed entity } to (1) { oxydized_copper_sword } ]

      If statement end
If statement end