Update DeviceOs to latest protocol

This commit is contained in:
rtm516 2024-04-07 12:44:50 +01:00
parent 3d9f3ac645
commit 45e2547e62
No known key found for this signature in database
GPG Key ID: 331715B8B007C67A
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -39,15 +39,16 @@ public enum DeviceOs {
OSX("macOS"),
AMAZON("Amazon"),
GEARVR("Gear VR"),
HOLOLENS("Hololens"),
HOLOLENS("Hololens"), // Removed from protocol but kept to keep numbers the same
UWP("Windows"),
WIN32("Windows x86"),
DEDICATED("Dedicated"),
TVOS("Apple TV"),
PS4("PS4"),
SONY("PlayStation"),
NX("Switch"),
XBOX("Xbox One"),
WINDOWS_PHONE("Windows Phone");
XBOX("Xbox"),
WINDOWS_PHONE("Windows Phone"),
LINUX("Linux");
private static final DeviceOs[] VALUES = values();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -68,7 +68,7 @@ public class FireworkEntity extends Entity {
// TODO: Remove once Mojang fixes bugs with fireworks crashing clients on these specific devices.
// https://bugs.mojang.com/browse/MCPE-89115
if (session.getClientData().getDeviceOs() == DeviceOs.XBOX
|| session.getClientData().getDeviceOs() == DeviceOs.PS4) {
|| session.getClientData().getDeviceOs() == DeviceOs.SONY) {
return;
}