[1.13 vanilla] How to test for a range of XP levels/points?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Flexico

Well-Known Member
Dec 15, 2012
328
39
53
After much googling, the closest thing I found to what I need is
Code:
execute if entity @p[nbt={XpLevel:10},distance=..2] run <command>
But that only checks if the player has EXACTLY 10 levels, rather than AT LEAST 10 levels, like I want. The "..2" for distance means "two or less," but that syntax doesn't seem to work within NBT tags.
 

2Crits

New Member
Jan 21, 2019
6
0
2
I don't think u can do about unless u use this~ or else idk sorry bud
also if ur willing to I would love to have some friends that play modpacks join me if ur interested let me know plz.
 

malicious_bloke

Over-Achiever
Jul 28, 2013
2,961
2,705
298
I don't really use commands that much but I think you've got it the wrong way round, so "10.." would be 10 or above, where "..10" would be 10 or below. From memory.
 
  • Like
Reactions: Flexico

Flexico

Well-Known Member
Dec 15, 2012
328
39
53
I don't really use commands that much but I think you've got it the wrong way round, so "10.." would be 10 or above, where "..10" would be 10 or below. From memory.
Yes, that is correct, but that syntax doesn't work within the nbt tags period; I tried.