本文整理汇总了Java中net.minecraft.util.IChatComponent.appendSibling方法的典型用法代码示例。如果您正苦于以下问题:Java IChatComponent.appendSibling方法的具体用法?Java IChatComponent.appendSibling怎么用?Java IChatComponent.appendSibling使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.IChatComponent
的用法示例。
在下文中一共展示了IChatComponent.appendSibling方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: join
import net.minecraft.util.IChatComponent; //导入方法依赖的package包/类
public static IChatComponent join(List<IChatComponent> components)
{
IChatComponent ichatcomponent = new ChatComponentText("");
for (int i = 0; i < components.size(); ++i)
{
if (i > 0)
{
if (i == components.size() - 1)
{
ichatcomponent.appendText(" and ");
}
else if (i > 0)
{
ichatcomponent.appendText(", ");
}
}
ichatcomponent.appendSibling((IChatComponent)components.get(i));
}
return ichatcomponent;
}
示例2: getChatComponentFromNthArg
import net.minecraft.util.IChatComponent; //导入方法依赖的package包/类
public static IChatComponent getChatComponentFromNthArg(ICommandSender sender, String[] args, int index, boolean p_147176_3_) throws PlayerNotFoundException
{
IChatComponent ichatcomponent = new ChatComponentText("");
for (int i = index; i < args.length; ++i)
{
if (i > index)
{
ichatcomponent.appendText(" ");
}
IChatComponent ichatcomponent1 = new ChatComponentText(args[i]);
if (p_147176_3_)
{
IChatComponent ichatcomponent2 = PlayerSelector.matchEntitiesToChatComponent(sender, args[i]);
if (ichatcomponent2 == null)
{
if (PlayerSelector.hasArguments(args[i]))
{
throw new PlayerNotFoundException();
}
}
else
{
ichatcomponent1 = ichatcomponent2;
}
}
ichatcomponent.appendSibling(ichatcomponent1);
}
return ichatcomponent;
}
示例3: func_180605_a
import net.minecraft.util.IChatComponent; //导入方法依赖的package包/类
public void func_180605_a(String p_180605_1_, ChatRawMessage[] p_180605_2_)
{
for (ChatRawMessage chatrawmessage : p_180605_2_)
{
this.func_176027_a(chatrawmessage.userName, chatrawmessage);
if (this.func_176028_a(chatrawmessage.modes, chatrawmessage.subscriptions, this.mc.gameSettings.streamChatUserFilter))
{
IChatComponent ichatcomponent = new ChatComponentText(chatrawmessage.userName);
IChatComponent ichatcomponent1 = new ChatComponentTranslation("chat.stream." + (chatrawmessage.action ? "emote" : "text"), new Object[] {this.twitchComponent, ichatcomponent, EnumChatFormatting.getTextWithoutFormattingCodes(chatrawmessage.message)});
if (chatrawmessage.action)
{
ichatcomponent1.getChatStyle().setItalic(Boolean.valueOf(true));
}
IChatComponent ichatcomponent2 = new ChatComponentText("");
ichatcomponent2.appendSibling(new ChatComponentTranslation("stream.userinfo.chatTooltip", new Object[0]));
for (IChatComponent ichatcomponent3 : GuiTwitchUserMode.func_152328_a(chatrawmessage.modes, chatrawmessage.subscriptions, (IStream)null))
{
ichatcomponent2.appendText("\n");
ichatcomponent2.appendSibling(ichatcomponent3);
}
ichatcomponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, ichatcomponent2));
ichatcomponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.TWITCH_USER_INFO, chatrawmessage.userName));
this.mc.ingameGUI.getChatGUI().printChatMessage(ichatcomponent1);
}
}
}
示例4: func_152328_a
import net.minecraft.util.IChatComponent; //导入方法依赖的package包/类
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;
}
示例5: func_175355_a
import net.minecraft.util.IChatComponent; //导入方法依赖的package包/类
public String func_175355_a(EnumDifficulty p_175355_1_)
{
IChatComponent ichatcomponent = new ChatComponentText("");
ichatcomponent.appendSibling(new ChatComponentTranslation("options.difficulty", new Object[0]));
ichatcomponent.appendText(": ");
ichatcomponent.appendSibling(new ChatComponentTranslation(p_175355_1_.getDifficultyResourceKey(), new Object[0]));
return ichatcomponent.getFormattedText();
}