Attempting to cast an Impulse with an extremely large magnitude causes a proportionally extreme amount of lag
beholderface opened this issue ยท 4 comments
Forge 43.1.55, Hexcasting 1.10.3, modlist
Attempting to cast one with a magnitude of 2^24 caused the next tick to take ~2200ms to complete, 2^25 resulted in ~4400ms, and so on.
Not likely to be a problem in most survival worlds, but on creative servers, or ones where people have media cubes for whatever reason, this could be done accidentally, or be abused by malicious people.
I suggest that a limit be imposed on Impulse so that it maxes out at a magnitude of 2^16 or something, which only resulted in ~10ms for the next tick (my test world was running at a consistent ~1.2ms/tick while not doing this).
Probably an issue with Minecraft's physics system rather than a bug in the mod, but still.
I think this could also be abused on normal servers if someone got an admin's truename, waited for them to do something in creative, and made a cleric impetus bound to them cast something involving such an impulse.
I initially tested this while standing in a 2-block-high space, turns out doing it while in open air causes the lag to last a lot longer
screenshot
I'm gonna do some experimentation and see if i can't find a number that is next to no lag, because jesus christ what are you doing that requires going at 65536 blocks per tick
I wasn't trying to do much of anything with these numbers, just seeing what would happen. No particular reason for 2^16.