2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Esophose <esophose@gmail.com>
|
|
|
|
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
|
2022-04-16 10:29:50 +02:00
|
|
|
index 8f95dff2148a3e411e2ca0dc3d4f97a4d38f9848..d5902d8a4e324014a0cdd503934f9b049e1f123c 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2022-04-16 10:29:50 +02:00
|
|
|
@@ -2249,7 +2249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
if (data != null && !particle.getDataType().isInstance(data)) {
|
|
|
|
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
|
|
|
|
}
|
|
|
|
- ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.toNMS(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count);
|
|
|
|
+ ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(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
|
2021-06-14 18:58:00 +02:00
|
|
|
this.getHandle().connection.send(packetplayoutworldparticles);
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
}
|