aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0854-Add-Listing-API-for-Player.patch
diff options
context:
space:
mode:
authorBjarne Koll <[email protected]>2024-10-31 17:25:52 +0100
committerGitHub <[email protected]>2024-10-31 17:25:52 +0100
commitad9c58e1035333a63aea416325d2ec988fdb9b36 (patch)
tree449bf4e16a4b8765c7d83e47935289a121bde692 /patches/server/0854-Add-Listing-API-for-Player.patch
parent147b7961fea0a33dde0cc6041bea578a5e25e7ee (diff)
downloadPaper-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/0854-Add-Listing-API-for-Player.patch')
-rw-r--r--patches/server/0854-Add-Listing-API-for-Player.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0854-Add-Listing-API-for-Player.patch b/patches/server/0854-Add-Listing-API-for-Player.patch
index f391783edb..bcdfa3834a 100644
--- a/patches/server/0854-Add-Listing-API-for-Player.patch
+++ b/patches/server/0854-Add-Listing-API-for-Player.patch
@@ -122,7 +122,7 @@ index d92fb522d88a790d9cea2e6c4edad30bb73298fc..a20e5f896cfbd0a3e60b741562194e30
// Paper end - Use single player info update packet on join
player.sentListPacket = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index abb0370243ad95260c5c6034e20097a09415fe00..47180d44b7e168352b17bc295ffb6d3ea6e0a937 100644
+index c582b8f307e6b8fd4991702d92c2e74c3012763a..334303fbb2cf0086ad133bdc07b27e833162f71a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -133,7 +133,7 @@ index abb0370243ad95260c5c6034e20097a09415fe00..47180d44b7e168352b17bc295ffb6d3e
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
private double health = 20;
-@@ -2116,7 +2117,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2114,7 +2115,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride);
}
// Paper end
@@ -142,7 +142,7 @@ index abb0370243ad95260c5c6034e20097a09415fe00..47180d44b7e168352b17bc295ffb6d3e
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
}
-@@ -2220,6 +2221,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2218,6 +2219,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
}