Posts: 350
Threads: 18
Joined: Oct 2014
Thanks: 26
Given 54 thank(s) in 47 post(s)
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.
Posts: 302
Threads: 8
Joined: Feb 2014
Thanks: 48
Given 30 thank(s) in 26 post(s)
02-02-2015, 06:22 AM
(This post was last modified: 02-02-2015, 06:27 AM by LO1ZB.)
I look into it.
EDIT:
the server is using a short int for experience. (xp not level)
Why? I have no idea.
Posts: 350
Threads: 18
Joined: Oct 2014
Thanks: 26
Given 54 thank(s) in 47 post(s)
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.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
02-02-2015, 07:35 AM
(This post was last modified: 02-02-2015, 07:41 AM by worktycho.)
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.