mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Fix bukkit connectivity issue.
This commit is contained in:
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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user