Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
20 Zeilen
1.5 KiB
Diff
20 Zeilen
1.5 KiB
Diff
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
|
|
index a57bdc69d56c0a0ff510f4103745b18ca7ff863e..f0ea99248db07e3b992fed5d950014bcbc951370 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -2061,7 +2061,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());
|
|
}
|
|
- 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
|
|
this.getHandle().connection.send(packetplayoutworldparticles);
|
|
|
|
}
|