forked from xjboss/KCauldronX
Fix player doesn't cloning after death/teleport, fix #282
This commit is contained in:
parent
25d6f61aed
commit
1817b56ba3
@ -380,7 +380,7 @@
|
|||||||
public EntityPlayerMP createPlayerForUser(GameProfile p_148545_1_)
|
public EntityPlayerMP createPlayerForUser(GameProfile p_148545_1_)
|
||||||
{
|
{
|
||||||
UUID uuid = EntityPlayer.func_146094_a(p_148545_1_);
|
UUID uuid = EntityPlayer.func_146094_a(p_148545_1_);
|
||||||
@@ -410,80 +619,199 @@
|
@@ -410,80 +619,200 @@
|
||||||
return new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(0), p_148545_1_, (ItemInWorldManager)object);
|
return new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(0), p_148545_1_, (ItemInWorldManager)object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,6 +504,7 @@
|
|||||||
+ par1EntityPlayerMP.dimension = targetDimension;
|
+ par1EntityPlayerMP.dimension = targetDimension;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ EntityPlayerMP entityplayermp1 = par1EntityPlayerMP;
|
+ EntityPlayerMP entityplayermp1 = par1EntityPlayerMP;
|
||||||
|
+ entityplayermp1.clonePlayer(par1EntityPlayerMP, returnFromEnd); // KCauldron - clone player
|
||||||
+ entityplayermp1.setWorld(this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension)); // make sure to update reference for bed spawn logic
|
+ entityplayermp1.setWorld(this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension)); // make sure to update reference for bed spawn logic
|
||||||
+ entityplayermp1.playerConqueredTheEnd = false;
|
+ entityplayermp1.playerConqueredTheEnd = false;
|
||||||
ChunkCoordinates chunkcoordinates1;
|
ChunkCoordinates chunkcoordinates1;
|
||||||
@ -620,7 +621,7 @@
|
|||||||
return entityplayermp1;
|
return entityplayermp1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,34 +820,112 @@
|
@@ -492,34 +821,112 @@
|
||||||
transferPlayerToDimension(p_72356_1_, p_72356_2_, mcServer.worldServerForDimension(p_72356_2_).getDefaultTeleporter());
|
transferPlayerToDimension(p_72356_1_, p_72356_2_, mcServer.worldServerForDimension(p_72356_2_).getDefaultTeleporter());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,7 +753,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void transferEntityToWorld(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_, Teleporter teleporter)
|
public void transferEntityToWorld(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_, Teleporter teleporter)
|
||||||
@@ -605,6 +1011,109 @@
|
@@ -605,6 +1012,109 @@
|
||||||
p_82448_1_.setWorld(p_82448_4_);
|
p_82448_1_.setWorld(p_82448_4_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -862,7 +863,7 @@
|
|||||||
public void sendPlayerInfoToAllPlayers()
|
public void sendPlayerInfoToAllPlayers()
|
||||||
{
|
{
|
||||||
if (++this.playerPingIndex > 600)
|
if (++this.playerPingIndex > 600)
|
||||||
@@ -612,11 +1121,13 @@
|
@@ -612,11 +1122,13 @@
|
||||||
this.playerPingIndex = 0;
|
this.playerPingIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -876,7 +877,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendPacketToAllPlayers(Packet p_148540_1_)
|
public void sendPacketToAllPlayers(Packet p_148540_1_)
|
||||||
@@ -877,13 +1388,24 @@
|
@@ -877,13 +1389,24 @@
|
||||||
for (int j = 0; j < this.playerEntityList.size(); ++j)
|
for (int j = 0; j < this.playerEntityList.size(); ++j)
|
||||||
{
|
{
|
||||||
EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(j);
|
EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(j);
|
||||||
@ -903,7 +904,7 @@
|
|||||||
if (d4 * d4 + d5 * d5 + d6 * d6 < p_148543_8_ * p_148543_8_)
|
if (d4 * d4 + d5 * d5 + d6 * d6 < p_148543_8_ * p_148543_8_)
|
||||||
{
|
{
|
||||||
entityplayermp.playerNetServerHandler.sendPacket(p_148543_11_);
|
entityplayermp.playerNetServerHandler.sendPacket(p_148543_11_);
|
||||||
@@ -941,13 +1463,16 @@
|
@@ -941,13 +1464,16 @@
|
||||||
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(1, 0.0F));
|
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(1, 0.0F));
|
||||||
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(7, p_72354_2_.getRainStrength(1.0F)));
|
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(7, p_72354_2_.getRainStrength(1.0F)));
|
||||||
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(8, p_72354_2_.getWeightedThunderStrength(1.0F)));
|
p_72354_1_.playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(8, p_72354_2_.getWeightedThunderStrength(1.0F)));
|
||||||
@ -921,7 +922,7 @@
|
|||||||
p_72385_1_.playerNetServerHandler.sendPacket(new S09PacketHeldItemChange(p_72385_1_.inventory.currentItem));
|
p_72385_1_.playerNetServerHandler.sendPacket(new S09PacketHeldItemChange(p_72385_1_.inventory.currentItem));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,9 +1486,17 @@
|
@@ -961,9 +1487,17 @@
|
||||||
return this.maxPlayers;
|
return this.maxPlayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -940,7 +941,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setWhiteListEnabled(boolean p_72371_1_)
|
public void setWhiteListEnabled(boolean p_72371_1_)
|
||||||
@@ -1032,12 +1565,30 @@
|
@@ -1032,12 +1566,30 @@
|
||||||
|
|
||||||
public void removeAllPlayers()
|
public void removeAllPlayers()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user