mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-08-24 14:52:50 +02:00
30 lines
1.5 KiB
Diff
30 lines
1.5 KiB
Diff
From 67e2a0dc20dbbb616efa940d653a5a85971ae06a Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Tue, 21 Apr 2020 14:43:02 +0200
|
|
Subject: [PATCH] Purpur MC-4 Fix - Item position desync
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityTrackerEntry.java | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
index 5269e45a81..8928f23eba 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
@@ -128,6 +128,12 @@ public class EntityTrackerEntry {
|
|
j = MathHelper.d(this.tracker.pitch * 256.0F / 360.0F);
|
|
Vec3D vec3d = this.tracker.getPositionVector().d(PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc));
|
|
boolean flag1 = vec3d.g() >= 7.62939453125E-6D;
|
|
+ // Purpur start - fixes MC-4
|
|
+ if (this.tracker instanceof EntityItem) {
|
|
+ Vec3D loc = PacketPlayOutEntity.a(PacketPlayOutEntity.a(tracker.locX()), PacketPlayOutEntity.a(tracker.locY()), PacketPlayOutEntity.a(tracker.locZ()));
|
|
+ tracker.setPosition(loc.getX(), loc.getY(), loc.getZ());
|
|
+ }
|
|
+ // Purpur end
|
|
Packet<?> packet1 = null;
|
|
boolean flag2 = flag1 || this.tickCounter % 60 == 0;
|
|
boolean flag3 = Math.abs(i - this.yRot) >= 1 || Math.abs(j - this.xRot) >= 1;
|
|
--
|
|
2.25.1.windows.1
|
|
|