Can't figure out how to set up a minimum exp procedure

Started by zorex73 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't figure out how to set up a minimum exp procedure

I making a mod that you spend exp to get an item by pressing a key binding. This works fine, but if I have no exp it still triggers the procedure giving me the item. I just need help finding out how to set a requirement for minimum exp.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probably the easiest method…
Thu, 06/30/2022 - 23:14

Probably the easiest method is to just check for a certain experience level.  You can easily check a player's current level, or the amount of EXP points they have towards their next level, but not the overall current number of EXP points they have.

If you wanted to check for a minimum of 100 EXP you could check for level 8 which requires a minimum of 112 EXP which in most cases is plenty close enough.

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but how do I check?
Sat, 07/02/2022 - 23:21

but how do I check?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Flow control tab  -->   If /…
Sun, 07/03/2022 - 00:50

Flow control tab  -->   If / Do block

Logic tab  -->   purple Math compare block

Player procedures  -->   Get XP level of target entity block

Math tab  -->   Number value block

 

IF: XP level > 7

Do: <your procedure>