From a99e0ca050f2625a9df7dee44f6b85686eff3fe1 Mon Sep 17 00:00:00 2001 From: Esophose Date: Sat, 3 Oct 2020 19:00:20 -0600 Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss --- ...r-spawnParticle-x-y-z-precision-loss.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch diff --git a/Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch new file mode 100644 index 0000000000..9cc9b7d082 --- /dev/null +++ b/Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Esophose +Date: Sat, 3 Oct 2020 18:57:47 -0600 +Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 47fccf065b3f87d78ddd97b56a65f9d97bb3c884..58caa3240b90cdc661e1e32e3f5c312ed62c3c21 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1953,7 +1953,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + if (data != null && !particle.getDataType().isInstance(data)) { + throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); + } +- PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(CraftParticle.toNMS(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); ++ PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(CraftParticle.toNMS(particle, data), true, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); // Paper - Fix x/y/z coordinate precision loss + getHandle().playerConnection.sendPacket(packetplayoutworldparticles); + + }