I think a fun(ny) idea would be to mixin into whatever part of the command interpreter converts strings into floats to accept Infinity, -Infinity, and NaN. I think NBT is parsed seprately so maybe that to. These values can already be set with an NBT editor so... yeah? Not sure if I can actually think of a good use case for this, but it's something I would like to see!
#Infinity and NaN support in commands
5 messages · Page 1 of 1 (latest)
this reminds me of the fact that minecraft now supports "infinite" duration status effects (although I think it still stores duration as an integer of ticks, so I think it just checks a threshold of a really high number or if it's equal to Integer.MAX_INTEGER)
hmmm... now I kinda wonder exactly how that's implemented, because if I did the math right, an integer limit of ticks is "only" 3.4 years long, so in theory "infinite duration" potions may still run out in the latest version
also going off of memory, the code you're looking for might be FloatArgumentType#getFloat or something related to that
It actually stores infinite potions as -1 ticks