Item States Dont Work

Started by MamaLuigi on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item States Dont Work

In my mod, in item states, whenever I try to set the "damage >= 0" to a different number, it doesn't accept it. I've tried doing it with the "damage false" set to true, but that doesn't work either.

After doing some testing, it seems that the highest number you can set the "damage >= 0" to is 1.

I would love for this to be fixed, as without it, I might need multiple items or custom code to change the models and textures.

Any help would be greatly appreciated!

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The damage property is a…
Mon, 09/16/2024 - 16:36

The damage property is a percentage value. 1 means 100%, and 0 means 0%.

For example you have an item with 120 durability and you want to change its texture when its durability reach 50.

(50 / 120) * 100 = 41.6%

So damage >= 0.416