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/0937-Improve-tag-parser-handling.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'patches/server/0937-Improve-tag-parser-handling.patch') diff --git a/patches/server/0937-Improve-tag-parser-handling.patch b/patches/server/0937-Improve-tag-parser-handling.patch index 36bc92d7a0..2d01b18c07 100644 --- a/patches/server/0937-Improve-tag-parser-handling.patch +++ b/patches/server/0937-Improve-tag-parser-handling.patch @@ -252,7 +252,7 @@ index 898b19887ed34c87003fc63cb5905df2ba6234a5..b47eeb23055b135d5567552ba983bfbc private void write(FriendlyByteBuf buf) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 90bed0a36b2d518b56164a414350ec02822ad42a..0d6c3cdd0c8fa8c6983e8a35bac89ff062e1a97f 100644 +index bf8355d3b235ce48cbb1011142096d42246a08e2..c4ffa8519b520e0793af90e149518951d7ffb65b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -778,6 +778,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl -- cgit v1.2.3