mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 01:55:47 +01:00
Fixup hardcore handling on join in 1.8->1.9 (#3946)
* Fix players crashing when logging into a 1.8 server on hardcore mode, Fixes #3944 * Requested change to #3944 fix
This commit is contained in:
parent
b367caa4b2
commit
8bec05ed38
@ -196,7 +196,9 @@ public class PlayerPacketRewriter1_9 {
|
||||
|
||||
handler(wrapper -> {
|
||||
EntityTracker1_9 tracker = wrapper.user().getEntityTracker(Protocol1_8To1_9.class);
|
||||
tracker.setGameMode(GameMode.getById(wrapper.get(Types.UNSIGNED_BYTE, 0))); //Set player gamemode
|
||||
short gamemodeId = wrapper.get(Types.UNSIGNED_BYTE, 0);
|
||||
gamemodeId &= -9; // remove the hardcore mode flag
|
||||
tracker.setGameMode(GameMode.getById(gamemodeId)); //Set player gamemode
|
||||
});
|
||||
|
||||
// Track player's dimension
|
||||
|
Loading…
Reference in New Issue
Block a user