Cuberite Forum
XP Level Limit? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: XP Level Limit? (/thread-1753.html)



XP Level Limit? - DiamondToaster - 02-02-2015

It seems that the server screams at me whenever I reach an xp level above 117. It says "Attempted to update invalid using an invalid value: -32512" or something like that. Is that a server limitation because vanilla servers can go up to 250 and upwards. Going above 117 would be useful for my MCSmash plugin because I use that for the damage indicator.


RE: XP Level Limit? - LO1ZB - 02-02-2015

I look into it.

EDIT:
the server is using a short int for experience. (xp not level)

Why? I have no idea.


RE: XP Level Limit? - DiamondToaster - 02-02-2015

Ok, I'm kinda using a bit of a cheesy method to get around that, but its nowhere near as desirable. It seems somewhat of an arbitrary limit.


RE: XP Level Limit? - worktycho - 02-02-2015

It looks like the restriction was put in place in Nov 2013 in PR 353. As for why it was put in place their is no mention, but we probably want to bump it to a 32 bit value to match minecraft.

I think I've found the reason. Prior to snapshot 14w04a the experience was sent to the client as a 16 bit value. So their was no need to be able to store larger values. However since the protocols prior to that snapshot have been removed we might as well increase the value to an int.


RE: XP Level Limit? - DiamondToaster - 02-02-2015

Ok, that will be quite a bit more optimal, thanks. Smile