Update realms library to 1.3.1, and implement network latch when connecting to Realms. Tested and working.
This commit is contained in:
parent
7cd70b3f26
commit
e6e019896f
6 changed files with 21 additions and 3 deletions
|
@ -79,7 +79,7 @@
|
|||
"name": "lzma:lzma:0.0.1"
|
||||
},
|
||||
{
|
||||
"name": "com.mojang:realms:1.2.10"
|
||||
"name": "com.mojang:realms:1.3.1"
|
||||
},
|
||||
{
|
||||
"name": "org.apache.commons:commons-compress:1.8.1"
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
"serverreq":true
|
||||
},
|
||||
{
|
||||
"name": "com.mojang:realms:1.2.10"
|
||||
"name": "com.mojang:realms:1.3.1"
|
||||
},
|
||||
{
|
||||
"name": "org.apache.commons:commons-compress:1.8.1"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"assets": "1.7.10",
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.mojang:realms:1.2.10"
|
||||
"name": "com.mojang:realms:1.3.1"
|
||||
},
|
||||
{
|
||||
"name": "org.apache.commons:commons-compress:1.8.1"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/realms/RealmsConnect.java
|
||||
+++ ../src-work/minecraft/net/minecraft/realms/RealmsConnect.java
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
+ cpw.mods.fml.client.FMLClientHandler.instance().connectToRealmsServer(p_connect_1_, p_connect_2_);
|
||||
inetaddress = InetAddress.getByName(p_connect_1_);
|
||||
|
||||
if (RealmsConnect.this.aborted)
|
|
@ -820,10 +820,17 @@ public class FMLClientHandler implements IFMLSidedHandler
|
|||
playClientBlock = new CountDownLatch(1);
|
||||
}
|
||||
|
||||
public void connectToRealmsServer(String host, int port)
|
||||
{
|
||||
playClientBlock = new CountDownLatch(1);
|
||||
}
|
||||
|
||||
private CountDownLatch playClientBlock;
|
||||
|
||||
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient)
|
||||
{
|
||||
if (playClientBlock == null)
|
||||
playClientBlock = new CountDownLatch(1);
|
||||
playClientBlock.countDown();
|
||||
this.currentPlayClient = new WeakReference<NetHandlerPlayClient>(netHandlerPlayClient);
|
||||
}
|
||||
|
|
|
@ -454,6 +454,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
|
|||
|
||||
public void abortClientHandshake(String type)
|
||||
{
|
||||
FMLLog.log(Level.INFO, "Aborting client handshake \"%s\"", type);
|
||||
FMLCommonHandler.instance().waitForPlayClient();
|
||||
completeClientSideConnection(ConnectionType.valueOf(type));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue