Houston, we got a patch (#2731)
* Houston, we got a patch * is this the end of the beginning or the beginning of the end
This commit is contained in:
@@ -5,17 +5,17 @@ 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
|
||||
index 898089983..ad5dcab78 100644
|
||||
index 26096afbe..bdb73b68a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private EnumChatVisibility ck;
|
||||
private boolean cl = true;
|
||||
private long cm = SystemUtils.getMonotonicMillis();
|
||||
private EnumChatVisibility ch;
|
||||
private boolean ci = true;
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
- private Entity spectatedEntity;
|
||||
+ private Entity spectatedEntity; private void setSpectatorTargetField(Entity e) { this.spectatedEntity = e; } // Paper - OBFHELPER
|
||||
public boolean worldChangeInvuln;
|
||||
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
||||
private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook;
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||
@@ -29,7 +29,7 @@ index 898089983..ad5dcab78 100644
|
||||
- this.spectatedEntity = (Entity) (entity == null ? this : entity);
|
||||
- if (entity1 != this.spectatedEntity) {
|
||||
- this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity));
|
||||
- this.playerConnection.a(this.spectatedEntity.locX, 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
|
||||
+ if (newSpectatorTarget == null) {
|
||||
+ newSpectatorTarget = this;
|
||||
}
|
||||
@@ -53,9 +53,17 @@ index 898089983..ad5dcab78 100644
|
||||
+ setSpectatorTargetField(newSpectatorTarget);
|
||||
+
|
||||
+ this.playerConnection.sendPacket(new PacketPlayOutCamera(newSpectatorTarget));
|
||||
+ this.playerConnection.a(this.spectatedEntity.locX, this.spectatedEntity.locY, this.spectatedEntity.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
+ this.playerConnection.a(this.spectatedEntity.locY(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (this.portalCooldown > 0 && !this.worldChangeInvuln) {
|
||||
--this.portalCooldown;
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
Reference in New Issue
Block a user