Better Questing

Better Questing

39M Downloads

[1.12] experience task requires negative experience

mensreaMC opened this issue ยท 2 comments

commented

https://imgur.com/a/UC8hEYt

This has happened a few times but I can't determine what causes it, only that it makes it so you can't complete a quest that requires experience.

commented

Was doing a bit of work on Standard Expansion panels and figured I'd take a look at this again while I was at it. Turns out this bug stems from vanilla. While BQ and the tasks used the correction 64bit precision, vanilla uses only 32bit and can somehow break by rolling into negatives (managed to do this merely by abusing the vanilla XP command). I don't know exactly how you did it on your end but you probably could notice something was up by your vanilla XP bar not leveling properly anymore.

Anyway, I've added some sanity checks to account for this weird behaviour and they should be included with the next Standard Expansion version (not those experimental ones however).

commented

This happens when the player's individual XP value (without levels) exceeds 2.14B. I think some of the old parts of the XP task are still using 32bit ints instead of 64bit longs. I'll have to double check and fix as necessary