public GuiTwitchUserMode(IStream streamIn, ChatUserInfo p_i1064_2_) { this.stream = streamIn; this.field_152337_h = p_i1064_2_; this.field_152338_i = new ChatComponentText(p_i1064_2_.displayName); this.field_152332_r.addAll(func_152328_a(p_i1064_2_.modes, p_i1064_2_.subscriptions, streamIn)); }
public static List<IChatComponent> func_152328_a(Set<ChatUserMode> p_152328_0_, Set<ChatUserSubscription> p_152328_1_, IStream p_152328_2_) { String s = p_152328_2_ == null ? null : p_152328_2_.func_152921_C(); boolean flag = p_152328_2_ != null && p_152328_2_.func_152927_B(); List<IChatComponent> list = Lists.<IChatComponent>newArrayList(); for (ChatUserMode chatusermode : p_152328_0_) { IChatComponent ichatcomponent = func_152329_a(chatusermode, s, flag); if (ichatcomponent != null) { IChatComponent ichatcomponent1 = new ChatComponentText("- "); ichatcomponent1.appendSibling(ichatcomponent); list.add(ichatcomponent1); } } for (ChatUserSubscription chatusersubscription : p_152328_1_) { IChatComponent ichatcomponent2 = func_152330_a(chatusersubscription, s, flag); if (ichatcomponent2 != null) { IChatComponent ichatcomponent3 = new ChatComponentText("- "); ichatcomponent3.appendSibling(ichatcomponent2); list.add(ichatcomponent3); } } return list; }
public GuiTwitchUserMode(IStream p_i1064_1_, ChatUserInfo p_i1064_2_) { this.field_152333_s = p_i1064_1_; this.field_152337_h = p_i1064_2_; this.field_152338_i = new ChatComponentText(p_i1064_2_.displayName); this.field_152332_r.addAll(func_152328_a(p_i1064_2_.modes, p_i1064_2_.subscriptions, p_i1064_1_)); }
public static List func_152328_a(Set p_152328_0_, Set p_152328_1_, IStream p_152328_2_) { String s = p_152328_2_ == null ? null : p_152328_2_.func_152921_C(); boolean flag = p_152328_2_ != null && p_152328_2_.func_152927_B(); ArrayList arraylist = Lists.newArrayList(); Iterator iterator = p_152328_0_.iterator(); IChatComponent ichatcomponent; ChatComponentText chatcomponenttext; while (iterator.hasNext()) { ChatUserMode chatusermode = (ChatUserMode)iterator.next(); ichatcomponent = func_152329_a(chatusermode, s, flag); if (ichatcomponent != null) { chatcomponenttext = new ChatComponentText("- "); chatcomponenttext.appendSibling(ichatcomponent); arraylist.add(chatcomponenttext); } } iterator = p_152328_1_.iterator(); while (iterator.hasNext()) { ChatUserSubscription chatusersubscription = (ChatUserSubscription)iterator.next(); ichatcomponent = func_152330_a(chatusersubscription, s, flag); if (ichatcomponent != null) { chatcomponenttext = new ChatComponentText("- "); chatcomponenttext.appendSibling(ichatcomponent); arraylist.add(chatcomponenttext); } } return arraylist; }
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)); } }
public IStream getTwitchStream() { return this.stream; }
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)); } }
protected void actionPerformed(GuiButton p_146284_1_) { if (p_146284_1_.enabled) { if (p_146284_1_.id < 100 && p_146284_1_ instanceof GuiOptionButton) { this.field_146443_h.setOptionValue(((GuiOptionButton)p_146284_1_).returnEnumOptions(), 1); p_146284_1_.displayString = this.field_146443_h.getKeyBinding(GameSettings.Options.getEnumOptions(p_146284_1_.id)); } if (p_146284_1_.id == 8675309) { this.mc.entityRenderer.activateNextShader(); } if (p_146284_1_.id == 101) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiVideoSettings(this, this.field_146443_h)); } if (p_146284_1_.id == 100) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiControls(this, this.field_146443_h)); } if (p_146284_1_.id == 102) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiLanguage(this, this.field_146443_h, this.mc.getLanguageManager())); } if (p_146284_1_.id == 103) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new ScreenChatOptions(this, this.field_146443_h)); } if (p_146284_1_.id == 104) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiSnooper(this, this.field_146443_h)); } if (p_146284_1_.id == 200) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(this.field_146441_g); } if (p_146284_1_.id == 105) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiScreenResourcePacks(this)); } if (p_146284_1_.id == 106) { this.mc.gameSettings.saveOptions(); this.mc.displayGuiScreen(new GuiScreenOptionsSounds(this, this.field_146443_h)); } if (p_146284_1_.id == 107) { this.mc.gameSettings.saveOptions(); IStream istream = this.mc.func_152346_Z(); if (istream.func_152936_l() && istream.func_152928_D()) { this.mc.displayGuiScreen(new GuiStreamOptions(this, this.field_146443_h)); } else { GuiStreamUnavailable.func_152321_a(this); } } } }
public IStream func_152346_Z() { return this.field_152353_at; }