Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Ignore entity movement packets if distance == 0
Dieser Commit ist enthalten in:
Ursprung
3dd60c168b
Commit
13fb0e07ce
@ -71,6 +71,11 @@ public class EntityTrackerEntry {
|
|||||||
boolean flag = Math.abs(i) >= 8 || Math.abs(j) >= 8 || Math.abs(k) >= 8;
|
boolean flag = Math.abs(i) >= 8 || Math.abs(j) >= 8 || Math.abs(k) >= 8;
|
||||||
boolean flag1 = Math.abs(l - this.g) >= 8 || Math.abs(i1 - this.h) >= 8;
|
boolean flag1 = Math.abs(l - this.g) >= 8 || Math.abs(i1 - this.h) >= 8;
|
||||||
|
|
||||||
|
//CraftBukkit - Create relative movement packet only if distance is greater than zero.
|
||||||
|
int distanceSquared = j1*j1+k1*k1+l1*l1;
|
||||||
|
flag = (distanceSquared > 0) && flag;
|
||||||
|
//CraftBukkit stop
|
||||||
|
|
||||||
if (j1 >= -128 && j1 < 128 && k1 >= -128 && k1 < 128 && l1 >= -128 && l1 < 128) {
|
if (j1 >= -128 && j1 < 128 && k1 >= -128 && k1 < 128 && l1 >= -128 && l1 < 128) {
|
||||||
if (flag && flag1) {
|
if (flag && flag1) {
|
||||||
object = new Packet33RelEntityMoveLook(this.a.id, (byte) j1, (byte) k1, (byte) l1, (byte) l, (byte) i1);
|
object = new Packet33RelEntityMoveLook(this.a.id, (byte) j1, (byte) k1, (byte) l1, (byte) l, (byte) i1);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren