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/1028-Improve-entity-effect-API.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/1028-Improve-entity-effect-API.patch')
-rw-r--r-- | patches/server/1028-Improve-entity-effect-API.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/1028-Improve-entity-effect-API.patch b/patches/server/1028-Improve-entity-effect-API.patch index eeec7bf075..20be4e8753 100644 --- a/patches/server/1028-Improve-entity-effect-API.patch +++ b/patches/server/1028-Improve-entity-effect-API.patch @@ -25,7 +25,7 @@ index b0e49ad831f1ebc6b126bf82c5fddaebffb91312..179886dcbda29c5cdb7dbd43e44951ae + // Paper end - broadcast hurt animation } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e1e73e877dfef5bcf30a99b275ececbf42f59c95..4eb2cd3f75e8e727199193dc8b1c01d4c855223c 100644 +index 766c1e80997d1bed99f4ebf9499eec60bf70a536..f668359f2fbe765c68fb575c31444bc0404cba0f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1294,6 +1294,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -49,7 +49,7 @@ index e1e73e877dfef5bcf30a99b275ececbf42f59c95..4eb2cd3f75e8e727199193dc8b1c01d4 } @Override -@@ -3542,4 +3547,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3540,4 +3545,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setSendViewDistance(final int viewDistance) { throw new UnsupportedOperationException("Not implemented yet"); } |