From ad9c58e1035333a63aea416325d2ec988fdb9b36 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Thu, 31 Oct 2024 17:25:52 +0100 Subject: Only expose velocity relative tp flags to API (#11532) Since 1.21.2, vanilla split relative teleportation flags into position and delta/velocity flags into separate enum entries. This highlighted a design flaw in the paper api addition for teleport flags, which just simply mirrored internals while also only being able to apply the delta/velocity part of a flag, given the teleport target is always absolute in the API. This patch proposes to simply no longer expose the non-velocity related flags to the API, instead marking the entire Relative enum as being purely velocity related, as non-velocity related flags are not useful to callers. This was done over simply exposing all internal flags, as another vanilla change to the internal enum would result in the same breakage. The newly proposed API *only* promises that the passed flags prevent the loss of velocity in the specific axis/context, which should be independent enough of vanillas specific implementation of this feature. --- patches/server/0783-Win-Screen-API.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'patches/server/0783-Win-Screen-API.patch') diff --git a/patches/server/0783-Win-Screen-API.patch b/patches/server/0783-Win-Screen-API.patch index 89c5499a4e..fa16e65f23 100644 --- a/patches/server/0783-Win-Screen-API.patch +++ b/patches/server/0783-Win-Screen-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3b6bd9a4b3c9767cdc13cda75e0be6d9aed0b672..3419024a58a3c68b160f16350c72d1250c10d4dd 100644 +index 01062856483557c874f54bc610c3d13fca44ef05..b6aa646b28aef25e07c6e7fc0dfc2a252671e6c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1322,6 +1322,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { -- cgit v1.2.3