From 57a9e5efc39bc051deda5f62e9f70435480d961e Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 7 Apr 2024 21:00:19 +0100 Subject: [PATCH] Revert enum name change and add deprecation annotations --- .../java/org/geysermc/floodgate/util/DeviceOs.java | 11 +++++++---- .../geysermc/geyser/entity/type/FireworkEntity.java | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/org/geysermc/floodgate/util/DeviceOs.java b/common/src/main/java/org/geysermc/floodgate/util/DeviceOs.java index 0b10640e9..1a92f9c40 100644 --- a/common/src/main/java/org/geysermc/floodgate/util/DeviceOs.java +++ b/common/src/main/java/org/geysermc/floodgate/util/DeviceOs.java @@ -39,15 +39,18 @@ public enum DeviceOs { OSX("macOS"), AMAZON("Amazon"), GEARVR("Gear VR"), - HOLOLENS("Hololens"), // Removed from protocol but kept to keep numbers the same + @Deprecated HOLOLENS("Hololens"), UWP("Windows"), WIN32("Windows x86"), DEDICATED("Dedicated"), - TVOS("Apple TV"), - SONY("PlayStation"), + @Deprecated TVOS("Apple TV"), + /** + * This is for all PlayStation platforms not just PS4 + */ + PS4("PlayStation"), NX("Switch"), XBOX("Xbox"), - WINDOWS_PHONE("Windows Phone"), + @Deprecated WINDOWS_PHONE("Windows Phone"), LINUX("Linux"); private static final DeviceOs[] VALUES = values(); diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/FireworkEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/FireworkEntity.java index d4b07c722..7a544f23c 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/FireworkEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/FireworkEntity.java @@ -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 * 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.SONY) { + || session.getClientData().getDeviceOs() == DeviceOs.PS4) { return; }