Revert enum name change and add deprecation annotations

This commit is contained in:
rtm516 2024-04-07 21:00:19 +01:00
parent 45e2547e62
commit 57a9e5efc3
No known key found for this signature in database
GPG Key ID: 331715B8B007C67A
2 changed files with 9 additions and 6 deletions

View File

@ -39,15 +39,18 @@ public enum DeviceOs {
OSX("macOS"), OSX("macOS"),
AMAZON("Amazon"), AMAZON("Amazon"),
GEARVR("Gear VR"), GEARVR("Gear VR"),
HOLOLENS("Hololens"), // Removed from protocol but kept to keep numbers the same @Deprecated HOLOLENS("Hololens"),
UWP("Windows"), UWP("Windows"),
WIN32("Windows x86"), WIN32("Windows x86"),
DEDICATED("Dedicated"), DEDICATED("Dedicated"),
TVOS("Apple TV"), @Deprecated TVOS("Apple TV"),
SONY("PlayStation"), /**
* This is for all PlayStation platforms not just PS4
*/
PS4("PlayStation"),
NX("Switch"), NX("Switch"),
XBOX("Xbox"), XBOX("Xbox"),
WINDOWS_PHONE("Windows Phone"), @Deprecated WINDOWS_PHONE("Windows Phone"),
LINUX("Linux"); LINUX("Linux");
private static final DeviceOs[] VALUES = values(); private static final DeviceOs[] VALUES = values();

View File

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