Fix bukkit connectivity issue.

This commit is contained in:
Christian committed 2014-01-16 14:58:28 -05:00
1 parent a4686b1261
commit dd17979a2f
6 files changed
+55

No files matched your search

@@ -32,6 +32,7 @@ import net.minecraft.client.gui.ServerListEntryNormal;
import net.minecraft.client.multiplayer.GuiConnecting;
import net.minecraft.client.multiplayer.ServerData;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.network.OldServerPinger;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -684,5 +685,28 @@ public class FMLClientHandler implements IFMLSidedHandler
{
showGuiScreen(new GuiConnecting(guiMultiplayer, client, serverEntry));
}
playClientBlock = new CountDownLatch(1);
}
private CountDownLatch playClientBlock;
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient)
{
playClientBlock.countDown();
}
@Override
public void waitForPlayClient()
{
boolean gotIt = false;
try
{
gotIt = playClientBlock.await(1,TimeUnit.SECONDS);
} catch (InterruptedException e)
{
}
if (!gotIt)
{
throw new RuntimeException("Timeout waiting for client thread to catch up!");
}
}
}