Help with an equation

Started by Thegamerx100 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with an equation

What equation is necessary to make that for each level of an enchantment (up to level 5) the number of a variable is reduced by 10%?

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it could be Set…
Tue, 08/25/2020 - 11:24

I think it could be

Set variable to {(get variable) - [(get variable / 10) * enchantment level] }

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And you could have a…
Tue, 08/25/2020 - 11:25

And you could have a condition which checks if the enchantment level is equal or greater than 5, it would simply halve the variable rather than executing the previous operation