diff --git a/patches/api/More-Teleport-API.patch b/patches/api/More-Teleport-API.patch index 76d646dacc..b4fdf8bfc9 100644 --- a/patches/api/More-Teleport-API.patch +++ b/patches/api/More-Teleport-API.patch @@ -57,35 +57,69 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + /** + * Note: These flags only work on {@link org.bukkit.entity.Player} entities. + *
-+ * Represents coordinates in a teleportation that should be handled relatively. -+ *
-+ * Coordinates of the location that the client should handle as relative teleportation
-+ * Relative teleportation flags are only used client side, and cause the player to not lose velocity in that
-+ * specific coordinate. The location of the teleportation will not change.
++ * Relative flags enable a player to not loose their velocity in the flag-specific axis/context when teleporting.
+ *
++ * @apiNote The relative flags exposed in the API do *not* mirror all flags known to vanilla, as relative flags concerning
++ * the position are non-applicable given teleports always expect an absolute location.
+ * @see org.bukkit.entity.Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
+ */
+ enum Relative implements TeleportFlag {
+ /**
-+ * Represents the player's X coordinate
++ * Configures the player to not loose velocity in their x axis during the teleport.
+ */
-+ X,
++ VELOCITY_X,
+ /**
-+ * Represents the player's Y coordinate
++ * Configures the player to not loose velocity in their y axis during the teleport.
+ */
-+ Y,
++ VELOCITY_Y,
+ /**
-+ * Represents the player's Z coordinate
++ * Configures the player to not loose velocity in their z axis during the teleport.
+ */
-+ Z,
++ VELOCITY_Z,
++ /**
++ * Configures the player to not loose velocity in their current rotation during the teleport.
++ */
++ VELOCITY_ROTATION;
++ /**
++ * Configures the player to not loose velocity in their x axis during the teleport.
++ * @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
++ * ones. As the API does not deal with position relative flags, this name is no longer applicable.
++ * Use {@link #VELOCITY_X} instead.
++ */
++ @Deprecated(since = "1.21.3", forRemoval = true)
++ public static final Relative X = VELOCITY_X;
++ /**
++ * Configures the player to not loose velocity in their y axis during the teleport.
++ * @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
++ * ones. As the API does not deal with position relative flags, this name is no longer applicable.
++ * Use {@link #VELOCITY_Y} instead.
++ */
++ @Deprecated(since = "1.21.3", forRemoval = true)
++ public static final Relative Y = VELOCITY_Y;
++ /**
++ * Configures the player to not loose velocity in their z axis during the teleport.
++ * @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
++ * ones. As the API does not deal with position relative flags, this name is no longer applicable.
++ * Use {@link #VELOCITY_Z} instead.
++ */
++ @Deprecated(since = "1.21.3", forRemoval = true)
++ public static final Relative Z = VELOCITY_Z;
+ /**
+ * Represents the player's yaw
++ *
++ * @deprecated relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and
++ * pitch having individual options. Use {@link #VELOCITY_ROTATION} instead.
+ */
-+ YAW,
++ @Deprecated(since = "1.21.3", forRemoval = true)
++ public static final Relative YAW = VELOCITY_ROTATION;
+ /**
+ * Represents the player's pitch
++ *
++ * @deprecated relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and
++ * pitch having individual options. Use {@link #VELOCITY_ROTATION} instead.
+ */
-+ PITCH;
++ @Deprecated(since = "1.21.3", forRemoval = true)
++ public static final Relative PITCH = VELOCITY_ROTATION;
+ }
+
+ /**
diff --git a/patches/server/More-Teleport-API.patch b/patches/server/More-Teleport-API.patch
index 88bcf406f6..929a892714 100644
--- a/patches/server/More-Teleport-API.patch
+++ b/patches/server/More-Teleport-API.patch
@@ -14,9 +14,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), cause);
+ // Paper start - Teleport API
-+ Set