本文整理汇总了Java中net.minecraft.client.gui.GuiNewChat.printChatMessageWithOptionalDeletion方法的典型用法代码示例。如果您正苦于以下问题:Java GuiNewChat.printChatMessageWithOptionalDeletion方法的具体用法?Java GuiNewChat.printChatMessageWithOptionalDeletion怎么用?Java GuiNewChat.printChatMessageWithOptionalDeletion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.gui.GuiNewChat
的用法示例。
在下文中一共展示了GuiNewChat.printChatMessageWithOptionalDeletion方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendNoSpamMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
private static void sendNoSpamMessages(ITextComponent[] messages)
{
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
{
chat.deleteChatLine(i);
}
for (int i = 0; i < messages.length; i++)
{
chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
}
lastAdded = DELETION_ID + messages.length - 1;
}
示例2: addChat
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
private static synchronized void addChat(final IChatComponent[] chat) {
final GuiNewChat chatGUI = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = 0; i < chat.length; ++i) {
final IChatComponent iChatComponent = chat[i];
chatGUI.printChatMessageWithOptionalDeletion(iChatComponent, 983423323 + i);
}
for (int i = chat.length; i < PacketTempChatMultiline.lastNum; ++i) {
chatGUI.deleteChatLine(983423323 + i);
}
PacketTempChatMultiline.lastNum = Math.max(PacketTempChatMultiline.lastNum, chat.length);
}
示例3: sendNoSpamMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static void sendNoSpamMessages(ITextComponent[] messages) {
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = DELETION_ID + messages.length - 1;i <= lastAdded;i++) {
chat.deleteChatLine(i);
}
for (int i = 0;i < messages.length;i++) {
chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
}
lastAdded = DELETION_ID + messages.length - 1;
}
示例4: sendNoSpamMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
private static void sendNoSpamMessages(IChatComponent[] messages) {
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) {
chat.deleteChatLine(i);
}
for (int i = 0; i < messages.length; i++) {
chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
}
lastAdded = DELETION_ID + messages.length - 1;
}
示例5: displayChatMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
private static void displayChatMessages(ITextComponent[] messages) {
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++) {
chat.deleteChatLine(i);
}
for (int i = 0; i < messages.length; i++) {
chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
}
lastAdded = DELETION_ID + messages.length - 1;
}
示例6: sendNoSpamMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
private static void sendNoSpamMessages(ITextComponent[] messages)
{
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
{
chat.deleteChatLine(i);
}
for (int i = 0; i < messages.length; i++)
{
chat.printChatMessageWithOptionalDeletion(messages[i], DELETION_ID + i);
}
lastAdded = DELETION_ID + messages.length - 1;
}
示例7: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage (int messageID, ITextComponent message)
{
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
示例8: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
示例9: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
示例10: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static void sendSpamlessMessage(int messageID, ITextComponent message)
{
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
示例11: sendNoSpamMessages
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
public static void sendNoSpamMessages(int messageID, ITextComponent message)
{
int deleteID = DELETION_ID+messageID;
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, deleteID);
}
示例12: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
/**
* Sends a spamless message to the chat. A spamless message is one that only shows up in
* the chat once. If another version of the message were to be added to chat, the earlier
* one would be removed.
*
* @param messageID A unique message ID used to separate your message from the others. It
* is highly recommended to use a random number to prevent conflicts with other mods
* doing similar things. Each message type should have it's own ID.
* @param message The message to send to chat, this message will replace earlier messages
* in the gui that use the same ID.
*/
@SideOnly(Side.CLIENT)
public static void sendSpamlessMessage (int messageID, ITextComponent message) {
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
示例13: sendSpamlessMessage
import net.minecraft.client.gui.GuiNewChat; //导入方法依赖的package包/类
/**
* Sends a spamless message to the chat. A spamless message is one that only shows up in
* the chat once. If another version of the message were to be added to chat, the earlier
* one would be removed.
*
* @param messageID A unique message ID used to separate your message from the others. It
* is highly recommended to use a random number to prevent conflicts with other mods
* doing similar things. Each message type should have it's own ID.
* @param message The message to send to chat, this message will replace earlier messages
* in the gui that use the same ID.
*/
@SideOnly(Side.CLIENT)
public static void sendSpamlessMessage (int messageID, ITextComponent message) {
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}