Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fixed credits screen not showing on 1.8 servers (#2724)
Dieser Commit ist enthalten in:
Ursprung
a49d73c4c6
Commit
752735159c
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren