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/0834-Implement-PlayerFailMoveEvent.patch | |
parent | 147b7961fea0a33dde0cc6041bea578a5e25e7ee (diff) | |
download | Paper-dev/1.21.2.tar.gz Paper-dev/1.21.2.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/0834-Implement-PlayerFailMoveEvent.patch')
-rw-r--r-- | patches/server/0834-Implement-PlayerFailMoveEvent.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0834-Implement-PlayerFailMoveEvent.patch b/patches/server/0834-Implement-PlayerFailMoveEvent.patch index 1c34e55f29..ad4b642a19 100644 --- a/patches/server/0834-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0834-Implement-PlayerFailMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 919b0ffb69720b3edeb9d25c7f41291a09976505..134d9fbdb757094a4624325c0ad8f32efadd61b6 100644 +index e653dc4ac16fd22674a6c1ba402f8913e0fbb336..2de655df951199c74758578c7f00fa053851b55e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1271,8 +1271,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -91,7 +91,7 @@ index 919b0ffb69720b3edeb9d25c7f41291a09976505..134d9fbdb757094a4624325c0ad8f32e this.internalTeleport(d3, d4, d5, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround()); } else { -@@ -3534,4 +3564,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3535,4 +3565,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand); } |