Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses CraftBukkit Changes: 38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks 6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses c64fe508 Mappings Update a3c2ec03 Fix missing ServerListPingEvent call for legacy pings Spigot Changes: 1dc156ce Rebuild patches 140f654d Mappings Update
This commit is contained in:
@@ -5,20 +5,20 @@ 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 d429e552e..6105a4e14 100644
|
||||
index b5d48e7bf..2679c2358 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 EntityHuman.EnumChatVisibility cs;
|
||||
private boolean ct = true;
|
||||
private long cu = SystemUtils.b();
|
||||
- private Entity cv;
|
||||
+ private Entity cv; private void setSpectatorTargetField(Entity e) { this.cv = e; } // Paper - OBFHELPER
|
||||
private long cu = SystemUtils.getMonotonicMillis();
|
||||
- private Entity spectatedEntity;
|
||||
+ private Entity spectatedEntity; private void setSpectatorTargetField(Entity e) { this.spectatedEntity = e; } // Paper - OBFHELPER
|
||||
public boolean worldChangeInvuln;
|
||||
private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer cy;
|
||||
private final RecipeBookServer recipeBook;
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return (Entity) (this.cv == null ? this : this.cv);
|
||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||
}
|
||||
|
||||
- public void setSpectatorTarget(Entity entity) {
|
||||
@@ -26,10 +26,10 @@ index d429e552e..6105a4e14 100644
|
||||
+ // Paper start - Add PlayerStartSpectatingEntityEvent and PlayerStopSpectatingEntity Event
|
||||
Entity entity1 = this.getSpecatorTarget();
|
||||
|
||||
- this.cv = (Entity) (entity == null ? this : entity);
|
||||
- if (entity1 != this.cv) {
|
||||
- this.playerConnection.sendPacket(new PacketPlayOutCamera(this.cv));
|
||||
- this.playerConnection.a(this.cv.locX, this.cv.locY, this.cv.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
- 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
|
||||
+ if (newSpectatorTarget == null) {
|
||||
+ newSpectatorTarget = this;
|
||||
}
|
||||
@@ -53,9 +53,8 @@ index d429e552e..6105a4e14 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
|
||||
+ // Paper end
|
||||
+
|
||||
+ this.playerConnection.a(this.cv.locX, this.cv.locY, this.cv.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
}
|
||||
|
||||
protected void E() {
|
||||
|
||||
Reference in New Issue
Block a user