mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 08:57:39 +01:00
Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
d9307dad0c
@ -97,8 +97,8 @@ public enum ClientboundPackets1_13 implements ClientboundPacketType {
|
||||
SPAWN_POSITION, // 0x49
|
||||
TIME_UPDATE, // 0x4A
|
||||
TITLE, // 0x4B
|
||||
STOP_SOUND, // 0x4D
|
||||
SOUND, // 0x4C
|
||||
STOP_SOUND, // 0x4C
|
||||
SOUND, // 0x4D
|
||||
TAB_LIST, // 0x4E
|
||||
COLLECT_ITEM, // 0x4F
|
||||
ENTITY_TELEPORT, // 0x50
|
||||
|
@ -350,10 +350,13 @@ public class PlayerPackets {
|
||||
map(Type.FLOAT); //1 - Value
|
||||
|
||||
handler(wrapper -> {
|
||||
if (wrapper.get(Type.UNSIGNED_BYTE, 0) == 3) { //Change gamemode
|
||||
short reason = wrapper.get(Type.UNSIGNED_BYTE, 0);
|
||||
if (reason == 3) { //Change gamemode
|
||||
int gamemode = wrapper.get(Type.FLOAT, 0).intValue();
|
||||
EntityTracker1_9 tracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
||||
tracker.setGameMode(GameMode.getById(gamemode));
|
||||
} else if (reason == 4) { //Open credits screen
|
||||
wrapper.set(Type.FLOAT, 0, 1F);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user