FieldAccessException with packet GAME_STATE_CHANGE
PrinceBunBun981 opened this issue · 4 comments
Describe the bug
When attempting to set the bytes for the packet GAME_STATE_CHANGE
it returns a FieldAccessException.
I've tried using:
PacketContainer packet = new PacketContainer(PacketType.Play.Server.GAME_STATE_CHANGE);
packet.getBytes().write(0, (byte) 4);
packet.getFloat().write(0, 1F);
To set the bytes for the GameState.
Version Info
ProtocolLib build 524
Dump: https://paste.helpch.at/epotetaqis.pl
Looks like Mojang made an internal pseudo-enum for this. The packet is encoded to/from a byte, which is why it's represented that way on wiki.vg. I'll look into a good way to read those
Actually you should be able to access it with
packet.getGameStateIDs()
How exactly would it be done with that?