Java 类net.minecraft.server.ServerListenThread 实例源码

项目:RuneCraftery    文件:IntegratedServerListenThread.java   
public String func_71755_c() throws IOException {
   if(this.field_71757_g == null) {
      int var1 = -1;

      try {
         var1 = HttpUtil.func_76181_a();
      } catch (IOException var4) {
         ;
      }

      if(var1 <= 0) {
         var1 = 25564;
      }

      try {
         this.field_71757_g = new ServerListenThread(this, (InetAddress)null, var1);
         this.field_71757_g.start();
      } catch (IOException var3) {
         throw var3;
      }
   }

   return String.valueOf(this.field_71757_g.func_71765_d());
}
项目:RuneCraftery    文件:FMLCommonHandler.java   
/**
 * Return the effective side for the context in the game. This is dependent
 * on thread analysis to try and determine whether the code is running in the
 * server or not. Use at your own risk
 */
public Side getEffectiveSide()
{
    Thread thr = Thread.currentThread();
    if ((thr instanceof ThreadMinecraftServer) || (thr instanceof ServerListenThread))
    {
        return Side.SERVER;
    }

    return Side.CLIENT;
}
项目:RuneCraftery    文件:FMLCommonHandler.java   
/**
 * Return the effective side for the context in the game. This is dependent
 * on thread analysis to try and determine whether the code is running in the
 * server or not. Use at your own risk
 */
public Side getEffectiveSide()
{
    Thread thr = Thread.currentThread();
    if ((thr instanceof ThreadMinecraftServer) || (thr instanceof ServerListenThread))
    {
        return Side.SERVER;
    }

    return Side.CLIENT;
}
项目:RuneCraftery    文件:IntegratedServerListenThread.java   
public String func_71755_c() throws IOException
{
    if (this.myServerListenThread == null)
    {
        int i = -1;

        try
        {
            i = HttpUtil.func_76181_a();
        }
        catch (IOException ioexception)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        try
        {
            this.myServerListenThread = new ServerListenThread(this, (InetAddress)null, i);
            this.myServerListenThread.start();
        }
        catch (IOException ioexception1)
        {
            throw ioexception1;
        }
    }

    return String.valueOf(this.myServerListenThread.getMyPort());
}
项目:BetterNutritionMod    文件:FMLCommonHandler.java   
/**
 * Return the effective side for the context in the game. This is dependent
 * on thread analysis to try and determine whether the code is running in the
 * server or not. Use at your own risk
 */
public Side getEffectiveSide()
{
    Thread thr = Thread.currentThread();
    if ((thr instanceof ThreadMinecraftServer) || (thr instanceof ServerListenThread))
    {
        return Side.SERVER;
    }

    return Side.CLIENT;
}
项目:BetterNutritionMod    文件:IntegratedServerListenThread.java   
public String func_71755_c() throws IOException
{
    if (this.myServerListenThread == null)
    {
        int i = -1;

        try
        {
            i = HttpUtil.func_76181_a();
        }
        catch (IOException ioexception)
        {
            ;
        }

        if (i <= 0)
        {
            i = 25564;
        }

        try
        {
            this.myServerListenThread = new ServerListenThread(this, (InetAddress)null, i);
            this.myServerListenThread.start();
        }
        catch (IOException ioexception1)
        {
            throw ioexception1;
        }
    }

    return String.valueOf(this.myServerListenThread.getMyPort());
}
项目:RuneCraftery    文件:DedicatedServerListenThread.java   
public DedicatedServerListenThread(MinecraftServer p_i1509_1_, InetAddress p_i1509_2_, int p_i1509_3_) throws IOException {
   super(p_i1509_1_);
   this.field_71763_c = new ServerListenThread(this, p_i1509_2_, p_i1509_3_);
   this.field_71763_c.start();
}
项目:RuneCraftery    文件:DedicatedServerListenThread.java   
public DedicatedServerListenThread(MinecraftServer par1MinecraftServer, InetAddress par2InetAddress, int par3) throws IOException
{
    super(par1MinecraftServer);
    this.theServerListenThread = new ServerListenThread(this, par2InetAddress, par3);
    this.theServerListenThread.start();
}
项目:BetterNutritionMod    文件:DedicatedServerListenThread.java   
public DedicatedServerListenThread(MinecraftServer par1MinecraftServer, InetAddress par2InetAddress, int par3) throws IOException
{
    super(par1MinecraftServer);
    this.theServerListenThread = new ServerListenThread(this, par2InetAddress, par3);
    this.theServerListenThread.start();
}
项目:cctags    文件:ClientProxy.java   
@Override
public boolean isServer() {
    Thread thr = Thread.currentThread();
    return thr instanceof ThreadMinecraftServer || thr instanceof ServerListenThread;
}