当前位置: 首页>>代码示例>>Java>>正文


Java NullStream类代码示例

本文整理汇总了Java中net.minecraft.client.stream.NullStream的典型用法代码示例。如果您正苦于以下问题:Java NullStream类的具体用法?Java NullStream怎么用?Java NullStream使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NullStream类属于net.minecraft.client.stream包,在下文中一共展示了NullStream类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initStream

import net.minecraft.client.stream.NullStream; //导入依赖的package包/类
private void initStream()
{
    try
    {
        this.stream = new TwitchStream(this, (Property)Iterables.getFirst(this.twitchDetails.get("twitch_access_token"), null));
    }
    catch (Throwable throwable)
    {
        this.stream = new NullStream(throwable);
        logger.error("Couldn\'t initialize twitch stream");
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:Minecraft.java

示例2: initStream

import net.minecraft.client.stream.NullStream; //导入依赖的package包/类
private void initStream() {
	try {
		this.stream = new TwitchStream(this,
				(Property) Iterables.getFirst(this.twitchDetails.get("twitch_access_token"), null));
	} catch (Throwable throwable) {
		this.stream = new NullStream(throwable);
		logger.error("Couldn\'t initialize twitch stream");
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:Minecraft.java

示例3: func_152321_a

import net.minecraft.client.stream.NullStream; //导入依赖的package包/类
public static void func_152321_a(GuiScreen p_152321_0_)
{
    Minecraft minecraft = Minecraft.getMinecraft();
    IStream istream = minecraft.getTwitchStream();

    if (!OpenGlHelper.framebufferSupported)
    {
        List<ChatComponentTranslation> list = Lists.<ChatComponentTranslation>newArrayList();
        list.add(new ChatComponentTranslation("stream.unavailable.no_fbo.version", new Object[] {GL11.glGetString(GL11.GL_VERSION)}));
        list.add(new ChatComponentTranslation("stream.unavailable.no_fbo.blend", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_EXT_blend_func_separate)}));
        list.add(new ChatComponentTranslation("stream.unavailable.no_fbo.arb", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_ARB_framebuffer_object)}));
        list.add(new ChatComponentTranslation("stream.unavailable.no_fbo.ext", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_EXT_framebuffer_object)}));
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.NO_FBO, list));
    }
    else if (istream instanceof NullStream)
    {
        if (((NullStream)istream).func_152937_a().getMessage().contains("Can\'t load AMD 64-bit .dll on a IA 32-bit platform"))
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.LIBRARY_ARCH_MISMATCH));
        }
        else
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.LIBRARY_FAILURE));
        }
    }
    else if (!istream.func_152928_D() && istream.func_152912_E() == ErrorCode.TTV_EC_OS_TOO_OLD)
    {
        switch (Util.getOSType())
        {
            case WINDOWS:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_WINDOWS));
                break;

            case OSX:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_MAC));
                break;

            default:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_OTHER));
        }
    }
    else if (!minecraft.getTwitchDetails().containsKey("twitch_access_token"))
    {
        if (minecraft.getSession().getSessionType() == Session.Type.LEGACY)
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.ACCOUNT_NOT_MIGRATED));
        }
        else
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.ACCOUNT_NOT_BOUND));
        }
    }
    else if (!istream.func_152913_F())
    {
        switch (istream.func_152918_H())
        {
            case INVALID_TOKEN:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.FAILED_TWITCH_AUTH));
                break;

            case ERROR:
            default:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.FAILED_TWITCH_AUTH_ERROR));
        }
    }
    else if (istream.func_152912_E() != null)
    {
        List<ChatComponentTranslation> list1 = Arrays.<ChatComponentTranslation>asList(new ChatComponentTranslation[] {new ChatComponentTranslation("stream.unavailable.initialization_failure.extra", new Object[]{ErrorCode.getString(istream.func_152912_E())})});
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.INITIALIZATION_FAILURE, list1));
    }
    else
    {
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNKNOWN));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:76,代码来源:GuiStreamUnavailable.java

示例4: func_152321_a

import net.minecraft.client.stream.NullStream; //导入依赖的package包/类
public static void func_152321_a(GuiScreen p_152321_0_)
{
    Minecraft minecraft = Minecraft.getMinecraft();
    IStream istream = minecraft.func_152346_Z();

    if (!OpenGlHelper.framebufferSupported)
    {
        ArrayList arraylist = Lists.newArrayList();
        arraylist.add(new ChatComponentTranslation("stream.unavailable.no_fbo.version", new Object[] {GL11.glGetString(GL11.GL_VERSION)}));
        arraylist.add(new ChatComponentTranslation("stream.unavailable.no_fbo.blend", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_EXT_blend_func_separate)}));
        arraylist.add(new ChatComponentTranslation("stream.unavailable.no_fbo.arb", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_ARB_framebuffer_object)}));
        arraylist.add(new ChatComponentTranslation("stream.unavailable.no_fbo.ext", new Object[] {Boolean.valueOf(GLContext.getCapabilities().GL_EXT_framebuffer_object)}));
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.NO_FBO, arraylist));
    }
    else if (istream instanceof NullStream)
    {
        if (((NullStream)istream).func_152937_a().getMessage().contains("Can\'t load AMD 64-bit .dll on a IA 32-bit platform"))
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.LIBRARY_ARCH_MISMATCH));
        }
        else
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.LIBRARY_FAILURE));
        }
    }
    else if (!istream.func_152928_D() && istream.func_152912_E() == ErrorCode.TTV_EC_OS_TOO_OLD)
    {
        switch (GuiStreamUnavailable.SwitchReason.field_152578_b[Util.getOSType().ordinal()])
        {
            case 1:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_WINDOWS));
                break;
            case 2:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_MAC));
                break;
            default:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNSUPPORTED_OS_OTHER));
        }
    }
    else if (!minecraft.func_152341_N().containsKey("twitch_access_token"))
    {
        if (minecraft.getSession().func_152428_f() == Session.Type.LEGACY)
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.ACCOUNT_NOT_MIGRATED));
        }
        else
        {
            minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.ACCOUNT_NOT_BOUND));
        }
    }
    else if (!istream.func_152913_F())
    {
        switch (GuiStreamUnavailable.SwitchReason.field_152579_c[istream.func_152918_H().ordinal()])
        {
            case 1:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.FAILED_TWITCH_AUTH));
                break;
            case 2:
            default:
                minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.FAILED_TWITCH_AUTH_ERROR));
        }
    }
    else if (istream.func_152912_E() != null)
    {
        List list = Arrays.asList(new ChatComponentTranslation[] {new ChatComponentTranslation("stream.unavailable.initialization_failure.extra", new Object[]{ErrorCode.getString(istream.func_152912_E())})});
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.INITIALIZATION_FAILURE, list));
    }
    else
    {
        minecraft.displayGuiScreen(new GuiStreamUnavailable(p_152321_0_, GuiStreamUnavailable.Reason.UNKNOWN));
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:73,代码来源:GuiStreamUnavailable.java


注:本文中的net.minecraft.client.stream.NullStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。