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

项目: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;
}
项目: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;
}
项目:RuneCraftery    文件:MinecraftServer.java   
public void func_71256_s() {
   (new ThreadMinecraftServer(this, "Server thread")).start();
}
项目:cctags    文件:ClientProxy.java   
@Override
public boolean isServer() {
    Thread thr = Thread.currentThread();
    return thr instanceof ThreadMinecraftServer || thr instanceof ServerListenThread;
}