diff options
author | Bjarne Koll <[email protected]> | 2024-10-31 17:25:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-31 17:25:52 +0100 |
commit | ad9c58e1035333a63aea416325d2ec988fdb9b36 (patch) | |
tree | 449bf4e16a4b8765c7d83e47935289a121bde692 /patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch | |
parent | 147b7961fea0a33dde0cc6041bea578a5e25e7ee (diff) | |
download | Paper-ad9c58e1035333a63aea416325d2ec988fdb9b36.tar.gz Paper-ad9c58e1035333a63aea416325d2ec988fdb9b36.zip |
Only expose velocity relative tp flags to API (#11532)dev/1.21.2
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.
Diffstat (limited to 'patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch')
-rw-r--r-- | patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch index bd42277333..14341b31e4 100644 --- a/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch @@ -115,10 +115,10 @@ index 064a7a3e1c4d192010e072a5e985a54135748d87..a706f0855fdf88cc9aece3ba00ef574b this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit this.level.updateSleepingPlayerList(); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b48966424fb8e937552c0e7bffaedaefc63ef77f..79eceb995f92b3f3d7b695dc6d2a0a4a824ce871 100644 +index 51ee01dfe5e144cb881c9376e586b95790a9ab98..f5e05a34afee8f5750b3a7871083968c5d75d2e7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1831,7 +1831,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1832,7 +1832,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.swing(enumhand, true); } } |