-
[1.12.2] merge same chat message
Hey, i found what i want, here the code if someone want. public static String lastMessage = ""; public static int line; public static int amount; @SubscribeEvent public static void chat(ClientChatReceivedEvent event) { NewChatGui guiNewChat = (Minecraft.getInstance()).ingameGUI.getChatGUI(); if (lastMessage.equals(event.getMessage().getFormattedText())) { guiNewChat.deleteChatLine(line); amount++; lastMessage = event.getMessage().getFormattedText(); event.getMessage().appendText(TextFormatting.GRAY + " (" +TextFormatting.GOLD+"x"+ amount +TextFormatting.GRAY+ ")"); } else { amount = 1; lastMessage = event.getMessage().getFormattedText(); } line++; if (!event.isCanceled()) guiNewChat.printChatMessageWithOptionalDeletion(event.getMessage(), line); if (line > 256) line = 0; event.setCanceled(true); }
-
[1.14.4] Using JSON file for configuration
Hello, i'm trying to use JSON file for my mod configuration. Actualy i use TOML, but ConfigValue does not allow HashMap. What i'm trying to do is: - Put default Question/Anwser into a hashmap (map.put("QUESTION", ANWSER");) - save default hashmap into the configuration - allow user(me) to edit the configuration to add other question without editing the code I do not know if i can do that with TOML or idk. All other things in my mode is done, i just need that, but i'm stuck. If anyone can help me, that would be great. Edit: sorry for english
-
[1.12.2] merge same chat message
Ok, so far i got that: But i do not know how to get the chatId...
-
[1.12.2] merge same chat message
[Reposted cause 1.8.9 is not supported here] Hello, i would like to make a mod that merge same message in chat. Instead of this i want this As i sent the same message, first message got edited and number increment. I think i need to use the ClientChatReceivedEvent but i'm not sure. I do not know how to explain this clearly, so i hope y'all understand. (if a similar mod already exist, please link it to me)
-
[1.8.9] Merge same chat message
Hello, i would like to make a mod that merge same message in chat. Instead of this i want this As i sent the same message, first message got edited and number increment. I think i need to use the ClientChatReceivedEvent but i'm not sure. I do not know how to explain this clearly, so i hope y'all understand. (if a similar mod already exist, please link it to me)
IPS spam blocked by CleanTalk.