Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Pass EntityPlayer to netHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
robotia committed Mar 2, 2016
1 parent 6709c35 commit 0221201
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
public EntityPlayerMP createPlayerForUser(GameProfile p_148545_1_)
{
UUID uuid = EntityPlayer.func_146094_a(p_148545_1_);
@@ -410,80 +621,249 @@
@@ -410,80 +621,250 @@
return new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(0), p_148545_1_, (ItemInWorldManager)object);
}

Expand Down Expand Up @@ -528,6 +528,7 @@
+
+ EntityPlayerMP entityplayermp1 = new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(p_72368_1_.dimension), p_72368_1_.getGameProfile(), (ItemInWorldManager)object);;
+ entityplayermp1.playerNetServerHandler = par1EntityPlayerMP.playerNetServerHandler;
+ entityplayermp1.playerNetServerHandler.playerEntity = entityplayermp1;
+ entityplayermp1.clonePlayer(par1EntityPlayerMP, returnFromEnd);
+ // entityplayermp1.dimension = targetDimension; Thermos move this call to later when actualDimension is found
+ // HEY don't setWorld here either, that has to down to the bottom
Expand Down Expand Up @@ -677,7 +678,7 @@
return entityplayermp1;
}

@@ -492,34 +872,112 @@
@@ -492,34 +873,112 @@
transferPlayerToDimension(p_72356_1_, p_72356_2_, mcServer.worldServerForDimension(p_72356_2_).getDefaultTeleporter());
}

Expand Down Expand Up @@ -809,7 +810,7 @@
}

public void transferEntityToWorld(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_, Teleporter teleporter)
@@ -605,6 +1063,109 @@
@@ -605,6 +1064,109 @@
p_82448_1_.setWorld(p_82448_4_);
}

Expand Down Expand Up @@ -919,7 +920,7 @@
public void sendPlayerInfoToAllPlayers()
{
if (++this.playerPingIndex > 600)
@@ -612,11 +1173,13 @@
@@ -612,11 +1174,13 @@
this.playerPingIndex = 0;
}

Expand All @@ -933,7 +934,7 @@
}

public void sendPacketToAllPlayers(Packet p_148540_1_)
@@ -877,13 +1440,24 @@
@@ -877,13 +1441,24 @@
for (int j = 0; j < this.playerEntityList.size(); ++j)
{
EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(j);
Expand All @@ -960,7 +961,7 @@
if (d4 * d4 + d5 * d5 + d6 * d6 < p_148543_8_ * p_148543_8_)
{
entityplayermp.playerNetServerHandler.sendPacket(p_148543_11_);
@@ -941,13 +1515,16 @@
@@ -941,13 +1516,16 @@
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(8, p_72354_2_.getWeightedThunderStrength(1.0F)));
Expand All @@ -978,7 +979,7 @@
p_72385_1_.playerNetServerHandler.sendPacket(new S09PacketHeldItemChange(p_72385_1_.inventory.currentItem));
}

@@ -961,9 +1538,17 @@
@@ -961,9 +1539,17 @@
return this.maxPlayers;
}

Expand All @@ -997,7 +998,7 @@
}

public void setWhiteListEnabled(boolean p_72371_1_)
@@ -1032,12 +1617,30 @@
@@ -1032,12 +1618,30 @@

public void removeAllPlayers()
{
Expand Down

0 comments on commit 0221201

Please sign in to comment.