3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Fixed credits screen not showing on 1.8 servers (#2724)

Dieser Commit ist enthalten in:
RK_01 2021-11-02 19:01:29 +01:00 committet von GitHub
Ursprung a49d73c4c6
Commit 752735159c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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);
}
});
}