mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
78 lines
3.9 KiB
Diff
78 lines
3.9 KiB
Diff
From 0c60a2d1e7ae744f963071a20be7f6039df1444d Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sun, 21 Sep 2014 12:57:40 -0700
|
|
Subject: [PATCH] Spigot Update - 20140916a
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
index 46c4fb8..8dad7ca 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
@@ -147,7 +147,7 @@ public class EntityTrackerEntry {
|
|
this.scanPlayers(new java.util.ArrayList(this.trackedPlayers));
|
|
}
|
|
// CraftBukkit end
|
|
- object = new PacketPlayOutEntityTeleport(this.tracker.getId(), i, j, k, (byte) l, (byte) i1, tracker.onGround); // Spigot - protocol patch
|
|
+ object = new PacketPlayOutEntityTeleport(this.tracker.getId(), i, j, k, (byte) l, (byte) i1, tracker.onGround, tracker instanceof EntityFallingBlock || tracker instanceof EntityTNTPrimed); // Spigot - protocol patch // Spigot Update - 20140916a
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutEntityTeleport.java b/src/main/java/net/minecraft/server/PacketPlayOutEntityTeleport.java
|
|
index 87260d5..b637d25 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutEntityTeleport.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutEntityTeleport.java
|
|
@@ -9,6 +9,7 @@ public class PacketPlayOutEntityTeleport extends Packet {
|
|
private byte e;
|
|
private byte f;
|
|
private boolean onGround; // Spigot - protocol patch
|
|
+ private boolean heightCorrection; // Spigot Update - 20140916a
|
|
|
|
public PacketPlayOutEntityTeleport() {}
|
|
|
|
@@ -21,7 +22,7 @@ public class PacketPlayOutEntityTeleport extends Packet {
|
|
this.f = (byte) ((int) (entity.pitch * 256.0F / 360.0F));
|
|
}
|
|
|
|
- public PacketPlayOutEntityTeleport(int i, int j, int k, int l, byte b0, byte b1, boolean onGround) { // Spigot - protocol patch
|
|
+ public PacketPlayOutEntityTeleport(int i, int j, int k, int l, byte b0, byte b1, boolean onGround, boolean heightCorrection) { // Spigot - protocol patch // Spigot Update - 20140916a
|
|
this.a = i;
|
|
this.b = j;
|
|
this.c = k;
|
|
@@ -29,6 +30,7 @@ public class PacketPlayOutEntityTeleport extends Packet {
|
|
this.e = b0;
|
|
this.f = b1;
|
|
this.onGround = onGround; // Spigot - protocol patch
|
|
+ this.heightCorrection = heightCorrection; // Spigot Update - 20140916a
|
|
}
|
|
|
|
public void a(PacketDataSerializer packetdataserializer) {
|
|
@@ -51,7 +53,7 @@ public class PacketPlayOutEntityTeleport extends Packet {
|
|
}
|
|
// Spigot end
|
|
packetdataserializer.writeInt(this.b);
|
|
- packetdataserializer.writeInt(this.c);
|
|
+ packetdataserializer.writeInt((packetdataserializer.version >= 16 && heightCorrection) ? (this.c - 16) : this.c); // Spigot Update - 20140916a
|
|
packetdataserializer.writeInt(this.d);
|
|
packetdataserializer.writeByte(this.e);
|
|
packetdataserializer.writeByte(this.f);
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java b/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java
|
|
index dcf1204..eef9de2 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java
|
|
@@ -116,6 +116,12 @@ public class PacketPlayOutSpawnEntity extends Packet {
|
|
int data = k >> 16;
|
|
k = id | ( data << 12 );
|
|
}
|
|
+
|
|
+ if ( ( j == 50 || j == 70 || j == 74 ) && packetdataserializer.version >= 16 ) // Spigot Update - 20140916a
|
|
+ {
|
|
+ c -= 16;
|
|
+ }
|
|
+
|
|
// Spigot end
|
|
packetdataserializer.writeInt(this.b);
|
|
packetdataserializer.writeInt(this.c);
|
|
--
|
|
1.9.4.msysgit.0
|
|
|