Fix spectator teleport target (#2743)

This commit is contained in:
Shane Freeder 2019-12-15 20:19:52 +00:00
parent 7d8117083f
commit 443ffb450b
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -1,11 +1,11 @@
From 43cc803ad57c8c12fc1b674583d951a13f88c130 Mon Sep 17 00:00:00 2001 From 8cf6495cc26f6715296f7fd24c49fb1debd68b11 Mon Sep 17 00:00:00 2001
From: Caleb Bassham <caleb.bassham@gmail.com> From: Caleb Bassham <caleb.bassham@gmail.com>
Date: Fri, 28 Sep 2018 02:32:19 -0500 Date: Fri, 28 Sep 2018 02:32:19 -0500
Subject: [PATCH] Call player spectator target events Subject: [PATCH] Call player spectator target events
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4c7692721..de11e1249 100644 index 4c7692721..d32d6d40a 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -53,7 +53,7 @@ index 4c7692721..de11e1249 100644
+ setSpectatorTargetField(newSpectatorTarget); + setSpectatorTargetField(newSpectatorTarget);
+ +
+ this.playerConnection.sendPacket(new PacketPlayOutCamera(newSpectatorTarget)); + this.playerConnection.sendPacket(new PacketPlayOutCamera(newSpectatorTarget));
+ this.playerConnection.a(this.spectatedEntity.locY(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit + this.playerConnection.a(this.spectatedEntity.locX(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
+ // Paper end + // Paper end
} }