3
0

Implement ReverseClonner, which should fix all issues with teleportation/inventories/crashed after respawning

This commit is contained in:
Sergey Shatunov
2016-02-06 04:29:03 +07:00
parent 313adcfbb0
commit 0b251c5440
10 changed files with 69 additions and 65 deletions

View File

@ -705,16 +705,7 @@
public void addChatComponentMessage(IChatComponent p_146105_1_)
{
this.playerNetServerHandler.sendPacket(new S02PacketChat(p_146105_1_));
@@ -878,6 +1204,8 @@
public void clonePlayer(EntityPlayer p_71049_1_, boolean p_71049_2_)
{
+ this.theInventoryEnderChest = p_71049_1_.theInventoryEnderChest;
+ if (p_71049_1_ instanceof EntityPlayerMP) ((org.bukkit.craftbukkit.entity.CraftLivingEntity) (bukkitEntity = ((EntityPlayerMP) p_71049_1_).bukkitEntity)).updateEntity(this);
super.clonePlayer(p_71049_1_, p_71049_2_);
this.lastExperience = -1;
this.lastHealth = -1.0F;
@@ -1037,6 +1365,114 @@
@@ -1037,6 +1363,114 @@
return this.field_143005_bX;
}