aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-03 11:12:54 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-03 11:12:54 +0700
commit487709996c22fb0dbcac792076be799a09865600 (patch)
tree5ab6f27a54d673fb057fd3eafd9a5e27816f898c
parentdf895d122a8a2ea249e686578e026c1d0a8b8c47 (diff)
downloadChatting-487709996c22fb0dbcac792076be799a09865600.tar.gz
Chatting-487709996c22fb0dbcac792076be799a09865600.tar.bz2
Chatting-487709996c22fb0dbcac792076be799a09865600.zip
Chattils -> Chatting (1.1.0)
Update images (ty Mo2men) update screenshot line tooltip (ty Mo2men)
-rw-r--r--build.gradle2
-rw-r--r--gradle.properties6
-rw-r--r--src/main/java/cc/woverflow/chatting/hook/GuiNewChatHook.java (renamed from src/main/java/cc/woverflow/chattils/hook/GuiNewChatHook.java)4
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/ClientCommandHandlerMixin.java)9
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/EntityPlayerSPMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/EntityPlayerSPMixin.java)8
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/GuiChatMixin.java)48
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatAccessor.java (renamed from src/main/java/cc/woverflow/chattils/mixin/GuiNewChatAccessor.java)2
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMapMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMapMixin.java)4
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMixin.java)78
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiUtilsMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/GuiUtilsMixin.java)6
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/WyvtilsListenerMixin.java (renamed from src/main/java/cc/woverflow/chattils/mixin/WyvtilsListenerMixin.java)4
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/Chatting.kt (renamed from src/main/kotlin/cc/woverflow/chattils/Chattils.kt)48
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatRegexes.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatRegexes.kt)2
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatSearchingManager.kt)4
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatShortcuts.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatShortcuts.kt)8
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatTab.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatTab.kt)4
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatTabs.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatTabs.kt)6
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatTabsJson.kt (renamed from src/main/kotlin/cc/woverflow/chattils/chat/ChatTabsJson.kt)2
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/command/ChattingCommand.kt (renamed from src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt)10
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt (renamed from src/main/kotlin/cc/woverflow/chattils/config/ChattilsConfig.kt)22
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutEditGui.kt)4
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutViewGui.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutViewGui.kt)6
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/components/CleanButton.kt)10
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/ScreenshotButton.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/components/ScreenshotButton.kt)10
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/SearchButton.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/components/SearchButton.kt)8
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/TabButton.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/components/TabButton.kt)6
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/gui/components/TextBlock.kt (renamed from src/main/kotlin/cc/woverflow/chattils/gui/components/TextBlock.kt)2
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/updater/DownloadGui.kt (renamed from src/main/kotlin/cc/woverflow/chattils/updater/DownloadGui.kt)14
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/updater/Updater.kt (renamed from src/main/kotlin/cc/woverflow/chattils/updater/Updater.kt)37
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/utils/ImageTransferable.kt (renamed from src/main/kotlin/cc/woverflow/chattils/utils/ImageTransferable.kt)2
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/utils/ListenableArrayList.kt (renamed from src/main/kotlin/cc/woverflow/chattils/utils/ListenableArrayList.kt)2
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/utils/ModCompatHooks.kt (renamed from src/main/kotlin/cc/woverflow/chattils/utils/ModCompatHooks.kt)10
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/utils/RenderHelper.kt (renamed from src/main/kotlin/cc/woverflow/chattils/utils/RenderHelper.kt)8
-rw-r--r--src/main/resources/assets/chattils/copy.pngbin641 -> 0 bytes
-rw-r--r--src/main/resources/assets/chattils/screenshot.pngbin162 -> 0 bytes
-rw-r--r--src/main/resources/assets/chatting/copy.pngbin0 -> 121 bytes
-rw-r--r--src/main/resources/assets/chatting/screenshot.pngbin0 -> 125 bytes
-rw-r--r--src/main/resources/assets/chatting/search.png (renamed from src/main/resources/assets/chattils/search.png)bin158 -> 158 bytes
-rw-r--r--src/main/resources/mcmod.info2
-rw-r--r--src/main/resources/mixins.chatting.json (renamed from src/main/resources/mixins.chattils.json)2
40 files changed, 198 insertions, 202 deletions
diff --git a/build.gradle b/build.gradle
index 07a6a66..73f57e2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,7 +12,7 @@ group = "cc.woverflow"
archivesBaseName = mod_name
blossom {
- String className = "src/main/kotlin/cc/woverflow/chattils/Chattils.kt"
+ String className = "src/main/kotlin/cc/woverflow/chatting/Chatting.kt"
replaceToken("@VER@", project.version, className)
replaceToken("@NAME@", mod_name, className)
replaceToken("@ID@", mod_id, className)
diff --git a/gradle.properties b/gradle.properties
index 4736025..ab3a8ff 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2G
-mod_name = Chattils
-mod_id = chattils
-mod_version = 1.0.0 \ No newline at end of file
+mod_name = Chatting
+mod_id = chatting
+mod_version = 1.1.0 \ No newline at end of file
diff --git a/src/main/java/cc/woverflow/chattils/hook/GuiNewChatHook.java b/src/main/java/cc/woverflow/chatting/hook/GuiNewChatHook.java
index f84fd43..51b19d4 100644
--- a/src/main/java/cc/woverflow/chattils/hook/GuiNewChatHook.java
+++ b/src/main/java/cc/woverflow/chatting/hook/GuiNewChatHook.java
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.hook;
+package cc.woverflow.chatting.hook;
import net.minecraft.client.gui.ChatLine;
@@ -9,7 +9,7 @@ public interface GuiNewChatHook {
boolean shouldCopy();
- Transferable getChattilsChatComponent(int mouseY);
+ Transferable getChattingChatComponent(int mouseY);
default ChatLine getFullMessage(ChatLine line) {
throw new AssertionError("getFullMessage not overridden on GuiNewChat");
diff --git a/src/main/java/cc/woverflow/chattils/mixin/ClientCommandHandlerMixin.java b/src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java
index 0692342..f771c87 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/ClientCommandHandlerMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.chat.ChatShortcuts;
-import cc.woverflow.chattils.config.ChattilsConfig;
+import cc.woverflow.chatting.chat.ChatShortcuts;
+import cc.woverflow.chatting.config.ChattingConfig;
import kotlin.Pair;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandHandler;
@@ -13,7 +13,6 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
-import java.util.Iterator;
import java.util.List;
@Mixin(value = ClientCommandHandler.class, remap = false)
@@ -22,7 +21,7 @@ public class ClientCommandHandlerMixin extends CommandHandler {
private List<String> addChatShortcuts(ClientCommandHandler instance, ICommandSender iCommandSender, String leftOfCursor, BlockPos blockPos) {
Minecraft mc = FMLClientHandler.instance().getClient();
List<String> autocompleteList = instance.getTabCompletionOptions(mc.thePlayer, leftOfCursor, mc.thePlayer.getPosition());
- if (ChattilsConfig.INSTANCE.getChatShortcuts()) {
+ if (ChattingConfig.INSTANCE.getChatShortcuts()) {
for (Pair<String, String> pair : ChatShortcuts.INSTANCE.getShortcuts()) {
if (pair.getFirst().startsWith(leftOfCursor)) {
autocompleteList.add(pair.getFirst());
diff --git a/src/main/java/cc/woverflow/chattils/mixin/EntityPlayerSPMixin.java b/src/main/java/cc/woverflow/chatting/mixin/EntityPlayerSPMixin.java
index 48dfc10..42c5579 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/EntityPlayerSPMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/EntityPlayerSPMixin.java
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.chat.ChatTabs;
-import cc.woverflow.chattils.config.ChattilsConfig;
+import cc.woverflow.chatting.chat.ChatTabs;
+import cc.woverflow.chatting.config.ChattingConfig;
import net.minecraft.client.entity.EntityPlayerSP;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -12,7 +12,7 @@ public class EntityPlayerSPMixin {
@ModifyVariable(method = "sendChatMessage", at = @At("HEAD"), ordinal = 0, argsOnly = true)
private String handleSentMessages(String value) {
if (value.startsWith("/")) return value;
- if (ChattilsConfig.INSTANCE.getChatTabs() && ChatTabs.INSTANCE.getCurrentTab() != null && !ChatTabs.INSTANCE.getCurrentTab().getPrefix().isEmpty()) {
+ if (ChattingConfig.INSTANCE.getChatTabs() && ChatTabs.INSTANCE.getCurrentTab() != null && !ChatTabs.INSTANCE.getCurrentTab().getPrefix().isEmpty()) {
return ChatTabs.INSTANCE.getCurrentTab().getPrefix() + value;
} else {
return value;
diff --git a/src/main/java/cc/woverflow/chattils/mixin/GuiChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
index 9af0204..73b76e7 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/GuiChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiChatMixin.java
@@ -1,14 +1,14 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.chat.ChatSearchingManager;
-import cc.woverflow.chattils.chat.ChatShortcuts;
-import cc.woverflow.chattils.chat.ChatTab;
-import cc.woverflow.chattils.chat.ChatTabs;
-import cc.woverflow.chattils.config.ChattilsConfig;
-import cc.woverflow.chattils.gui.components.ScreenshotButton;
-import cc.woverflow.chattils.gui.components.SearchButton;
-import cc.woverflow.chattils.hook.GuiNewChatHook;
-import cc.woverflow.chattils.utils.ModCompatHooks;
+import cc.woverflow.chatting.chat.ChatSearchingManager;
+import cc.woverflow.chatting.chat.ChatShortcuts;
+import cc.woverflow.chatting.chat.ChatTab;
+import cc.woverflow.chatting.chat.ChatTabs;
+import cc.woverflow.chatting.config.ChattingConfig;
+import cc.woverflow.chatting.gui.components.ScreenshotButton;
+import cc.woverflow.chatting.gui.components.SearchButton;
+import cc.woverflow.chatting.hook.GuiNewChatHook;
+import cc.woverflow.chatting.utils.ModCompatHooks;
import com.google.common.collect.Lists;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
@@ -34,24 +34,24 @@ public abstract class GuiChatMixin extends GuiScreen {
@Unique
private static final List<String> COPY_TOOLTIP = Lists.newArrayList(
- "\u00A73\u00A7l\u00A7nCopy To Clipboard",
- "\u00A7lNORMAL CLICK\u00A7r - Full Message",
- "\u00A7lCTRL CLICK\u00A7r - Single Line",
- "\u00A7lSHIFT CLICK\u00A7r - Screenshot Line",
+ "\u00A7e\u00A7lCopy To Clipboard",
+ "\u00A7b\u00A7lNORMAL CLICK\u00A7r \u00A78- \u00A77Full Message",
+ "\u00A7b\u00A7lCTRL CLICK\u00A7r \u00A78- \u00A77Single Line",
+ "\u00A7b\u00A7lSHIFT CLICK\u00A7r \u00A78- \u00A77Screenshot Line",
"",
- "\u00A73\u00A7l\u00A7nModifiers",
- "\u00A7lALT\u00A7r - Formatting Codes");
+ "\u00A7e\u00A7lModifiers",
+ "\u00A7b\u00A7lALT\u00A7r \u00A78- \u00A77Formatting Codes");
private SearchButton searchButton;
@Inject(method = "initGui", at = @At("TAIL"))
private void init(CallbackInfo ci) {
- if (ChattilsConfig.INSTANCE.getChatSearch()) {
+ if (ChattingConfig.INSTANCE.getChatSearch()) {
searchButton = new SearchButton();
buttonList.add(searchButton);
}
buttonList.add(new ScreenshotButton());
- if (ChattilsConfig.INSTANCE.getChatTabs()) {
+ if (ChattingConfig.INSTANCE.getChatTabs()) {
for (ChatTab chatTab : ChatTabs.INSTANCE.getTabs()) {
buttonList.add(chatTab.getButton());
}
@@ -60,14 +60,14 @@ public abstract class GuiChatMixin extends GuiScreen {
@Inject(method = "updateScreen", at = @At("HEAD"))
private void updateScreen(CallbackInfo ci) {
- if (ChattilsConfig.INSTANCE.getChatSearch() && searchButton.isEnabled()) {
+ if (ChattingConfig.INSTANCE.getChatSearch() && searchButton.isEnabled()) {
searchButton.getInputField().updateCursorCounter();
}
}
@Inject(method = "keyTyped", at = @At("HEAD"), cancellable = true)
private void keyTyped(char typedChar, int keyCode, CallbackInfo ci) {
- if (ChattilsConfig.INSTANCE.getChatSearch() && searchButton.isEnabled()) {
+ if (ChattingConfig.INSTANCE.getChatSearch() && searchButton.isEnabled()) {
ci.cancel();
if (keyCode == 1) {
searchButton.onMousePress();
@@ -83,7 +83,7 @@ public abstract class GuiChatMixin extends GuiScreen {
GuiNewChatHook hook = ((GuiNewChatHook) Minecraft.getMinecraft().ingameGUI.getChatGUI());
float f = mc.ingameGUI.getChatGUI().getChatScale();
int x = MathHelper.floor_float((float) mouseX / f);
- if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 9 > x) {
+ if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 11 > x) {
GuiUtils.drawHoveringText(COPY_TOOLTIP, mouseX, mouseY, width, height, -1, fontRendererObj);
GlStateManager.disableLighting();
}
@@ -94,8 +94,8 @@ public abstract class GuiChatMixin extends GuiScreen {
GuiNewChatHook hook = ((GuiNewChatHook) Minecraft.getMinecraft().ingameGUI.getChatGUI());
float f = mc.ingameGUI.getChatGUI().getChatScale();
int x = MathHelper.floor_float((float) mouseX / f);
- if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 9 > x) {
- Transferable message = hook.getChattilsChatComponent(Mouse.getY());
+ if (hook.shouldCopy() && (hook.getRight() + ModCompatHooks.getXOffset()) <= x && (hook.getRight() + ModCompatHooks.getXOffset()) + 11 > x) {
+ Transferable message = hook.getChattingChatComponent(Mouse.getY());
if (message == null) return;
try {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(message, null);
@@ -107,7 +107,7 @@ public abstract class GuiChatMixin extends GuiScreen {
@ModifyArg(method = "keyTyped", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiChat;sendChatMessage(Ljava/lang/String;)V"), index = 0)
private String modifySentMessage(String original) {
- if (ChattilsConfig.INSTANCE.getChatShortcuts()) {
+ if (ChattingConfig.INSTANCE.getChatShortcuts()) {
if (original.startsWith("/")) {
return "/" + ChatShortcuts.INSTANCE.handleSentCommand(StringUtils.substringAfter(original, "/"));
}
diff --git a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatAccessor.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatAccessor.java
index 1bce77a..8b81a50 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatAccessor.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatAccessor.java
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
import net.minecraft.client.gui.ChatLine;
import net.minecraft.client.gui.GuiNewChat;
diff --git a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMapMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMapMixin.java
index 97d39c5..5b38bda 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMapMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMapMixin.java
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.hook.GuiNewChatHook;
+import cc.woverflow.chatting.hook.GuiNewChatHook;
import net.minecraft.client.gui.ChatLine;
import net.minecraft.client.gui.GuiNewChat;
import net.minecraft.util.IChatComponent;
diff --git a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
index eea68c8..4edafb2 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/GuiNewChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
@@ -1,12 +1,13 @@
-package cc.woverflow.chattils.mixin;
-
-import cc.woverflow.chattils.Chattils;
-import cc.woverflow.chattils.chat.ChatSearchingManager;
-import cc.woverflow.chattils.chat.ChatTabs;
-import cc.woverflow.chattils.config.ChattilsConfig;
-import cc.woverflow.chattils.hook.GuiNewChatHook;
-import cc.woverflow.chattils.utils.ModCompatHooks;
-import cc.woverflow.chattils.utils.RenderHelper;
+package cc.woverflow.chatting.mixin;
+
+import cc.woverflow.chatting.Chatting;
+import cc.woverflow.chatting.chat.ChatSearchingManager;
+import cc.woverflow.chatting.chat.ChatTabs;
+import cc.woverflow.chatting.config.ChattingConfig;
+import cc.woverflow.chatting.gui.components.CleanButton;
+import cc.woverflow.chatting.hook.GuiNewChatHook;
+import cc.woverflow.chatting.utils.ModCompatHooks;
+import cc.woverflow.chatting.utils.RenderHelper;
import gg.essential.universal.UMouse;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.*;
@@ -33,15 +34,15 @@ import java.util.Locale;
@Mixin(value = GuiNewChat.class, priority = Integer.MIN_VALUE)
public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
- @Unique private int chattils$right = 0;
- @Unique private boolean chattils$shouldCopy;
- @Unique private boolean chattils$chatCheck;
- @Unique private int chattils$textOpacity;
+ @Unique private int chatting$right = 0;
+ @Unique private boolean chatting$shouldCopy;
+ @Unique private boolean chatting$chatCheck;
+ @Unique private int chatting$textOpacity;
@Shadow @Final private Minecraft mc;
@Shadow @Final private List<ChatLine> drawnChatLines;
@SuppressWarnings({"FieldCanBeLocal", "unused"})
private float percentComplete;
- private String chattils$previousText = "";
+ private String chatting$previousText = "";
@Shadow public abstract boolean getChatOpen();
@@ -54,12 +55,12 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Shadow public abstract void deleteChatLine(int id);
- @Unique private static final ResourceLocation COPY = new ResourceLocation("chattils:copy.png");
+ @Unique private static final ResourceLocation COPY = new ResourceLocation("chatting:copy.png");
@Inject(method = "printChatMessageWithOptionalDeletion", at = @At("HEAD"), cancellable = true)
private void handlePrintChatMessage(IChatComponent chatComponent, int chatLineId, CallbackInfo ci) {
handleChatTabMessage(chatComponent, chatLineId, mc.ingameGUI.getUpdateCounter(), false, ci);
- if (!EnumChatFormatting.getTextWithoutFormattingCodes(chatComponent.getUnformattedText()).toLowerCase(Locale.ENGLISH).contains(chattils$previousText.toLowerCase(Locale.ENGLISH))) {
+ if (!EnumChatFormatting.getTextWithoutFormattingCodes(chatComponent.getUnformattedText()).toLowerCase(Locale.ENGLISH).contains(chatting$previousText.toLowerCase(Locale.ENGLISH))) {
percentComplete = 1.0F;
}
}
@@ -72,20 +73,20 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Inject(method = "drawChat", at = @At("HEAD"))
private void checkScreenshotKeybind(int j2, CallbackInfo ci) {
- if (Chattils.INSTANCE.getKeybind().isPressed()) {
- Chattils.INSTANCE.setDoTheThing(true);
+ if (Chatting.INSTANCE.getKeybind().isPressed()) {
+ Chatting.INSTANCE.setDoTheThing(true);
}
- chattils$chatCheck = false;
+ chatting$chatCheck = false;
}
@ModifyVariable(method = "drawChat", at = @At("HEAD"), argsOnly = true)
private int setUpdateCounterWhjenYes(int updateCounter) {
- return Chattils.INSTANCE.getDoTheThing() ? 0 : updateCounter;
+ return Chatting.INSTANCE.getDoTheThing() ? 0 : updateCounter;
}
@ModifyVariable(method = "drawChat", at = @At("STORE"), index = 2)
private int setChatLimitWhenYes(int linesToDraw) {
- return Chattils.INSTANCE.getDoTheThing()
+ return Chatting.INSTANCE.getDoTheThing()
? GuiNewChat.calculateChatboxHeight(mc.gameSettings.chatHeightFocused) / 9
: linesToDraw;
}
@@ -102,8 +103,8 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
int mouseY = MathHelper.floor_double(UMouse.getScaledY()) - 27 + ModCompatHooks.getYOffset() - ModCompatHooks.getChatPosition();
mouseX = MathHelper.floor_float((float)mouseX / f);
mouseY = -(MathHelper.floor_float((float)mouseY / f)); //WHY DO I NEED TO DO THIS
- if (mouseX >= (left + ModCompatHooks.getXOffset()) && mouseY < bottom && mouseX < (right + 9 + ModCompatHooks.getXOffset()) && mouseY >= top) {
- chattils$shouldCopy = true;
+ if (mouseX >= (left + ModCompatHooks.getXOffset()) && mouseY < bottom && mouseX < (right + 11 + ModCompatHooks.getXOffset()) && mouseY >= top) {
+ chatting$shouldCopy = true;
drawCopyChatBox(right, top);
}
}
@@ -111,12 +112,12 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Redirect(method = "drawChat", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/GuiNewChat;drawnChatLines:Ljava/util/List;", opcode = Opcodes.GETFIELD))
private List<ChatLine> injected(GuiNewChat instance) {
- return ChatSearchingManager.filterMessages(chattils$previousText, drawnChatLines);
+ return ChatSearchingManager.filterMessages(chatting$previousText, drawnChatLines);
}
@ModifyVariable(method = "drawChat", at = @At("STORE"), ordinal = 7)
private int modifyYeah(int value) {
- return chattils$textOpacity = (int) (((float) (getChatOpen() ? 255 : value)) * (mc.gameSettings.chatOpacity * 0.9F + 0.1F));
+ return chatting$textOpacity = (int) (((float) (getChatOpen() ? 255 : value)) * (mc.gameSettings.chatOpacity * 0.9F + 0.1F));
}
@Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawStringWithShadow(Ljava/lang/String;FFI)I"))
@@ -126,28 +127,28 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Inject(method = "drawChat", at = @At("RETURN"))
private void checkStuff(int j2, CallbackInfo ci) {
- if (!chattils$chatCheck && chattils$shouldCopy) {
- chattils$shouldCopy = false;
+ if (!chatting$chatCheck && chatting$shouldCopy) {
+ chatting$shouldCopy = false;
}
}
@Inject(method = "getChatHeight", at = @At("HEAD"), cancellable = true)
private void customHeight_getChatHeight(CallbackInfoReturnable<Integer> cir) {
- if (ChattilsConfig.INSTANCE.getCustomChatHeight()) cir.setReturnValue(Chattils.INSTANCE.getChatHeight(this.getChatOpen()));
+ if (ChattingConfig.INSTANCE.getCustomChatHeight()) cir.setReturnValue(Chatting.INSTANCE.getChatHeight(this.getChatOpen()));
}
@Override
public int getRight() {
- return chattils$right;
+ return chatting$right;
}
@Override
public boolean shouldCopy() {
- return chattils$shouldCopy;
+ return chatting$shouldCopy;
}
private void handleChatTabMessage(IChatComponent chatComponent, int chatLineId, int updateCounter, boolean displayOnly, CallbackInfo ci) {
- if (ChattilsConfig.INSTANCE.getChatTabs()) {
+ if (ChattingConfig.INSTANCE.getChatTabs()) {
if (!ChatTabs.INSTANCE.shouldRender(chatComponent)) {
percentComplete = 1.0F;
if (chatLineId != 0) {
@@ -166,7 +167,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
}
private void drawCopyChatBox(int right, int top) {
- chattils$chatCheck = true;
+ chatting$chatCheck = true;
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
GlStateManager.enableDepth();
@@ -179,8 +180,9 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
- chattils$right = right;
+ chatting$right = right;
Gui.drawModalRectWithCustomSizedTexture(right, top, 0f, 0f, 9, 9, 9, 9);
+ drawRect(right - 1, top - 1, right + 10, top + 10, (((right + ModCompatHooks.getXOffset()) <= (UMouse.getScaledX() / mc.ingameGUI.getChatGUI().getChatScale()) && (right + ModCompatHooks.getXOffset()) + 11 > (UMouse.getScaledX() / mc.ingameGUI.getChatGUI().getChatScale())) ? CleanButton.Companion.getHoveredColor() : CleanButton.Companion.getColor()));
GlStateManager.disableAlpha();
GlStateManager.disableRescaleNormal();
GlStateManager.disableLighting();
@@ -188,7 +190,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
}
@Override
- public Transferable getChattilsChatComponent(int mouseY) {
+ public Transferable getChattingChatComponent(int mouseY) {
if (this.getChatOpen()) {
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
int i = scaledresolution.getScaleFactor();
@@ -207,7 +209,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
ChatLine fullLine = this.getFullMessage(subLine);
if (GuiScreen.isShiftKeyDown()) {
if (fullLine != null) {
- BufferedImage image = Chattils.INSTANCE.screenshotLine(fullLine);
+ BufferedImage image = Chatting.INSTANCE.screenshotLine(fullLine);
if (image != null) RenderHelper.INSTANCE.copyBufferedImageToClipboard(image);
}
return null;
@@ -225,16 +227,16 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
@Override
public String getPrevText() {
- return chattils$previousText;
+ return chatting$previousText;
}
@Override
public void setPrevText(String prevText) {
- chattils$previousText = prevText;
+ chatting$previousText = prevText;
}
@Override
public int getTextOpacity() {
- return chattils$textOpacity;
+ return chatting$textOpacity;
}
}
diff --git a/src/main/java/cc/woverflow/chattils/mixin/GuiUtilsMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiUtilsMixin.java
index df8216b..6489f67 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/GuiUtilsMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiUtilsMixin.java
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.config.ChattilsConfig;
+import cc.woverflow.chatting.config.ChattingConfig;
import net.minecraftforge.fml.client.config.GuiUtils;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -15,7 +15,7 @@ public class GuiUtilsMixin {
@Redirect(method = "drawHoveringText", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/config/GuiUtils;drawGradientRect(IIIIIII)V"))
private static void redirectBackground(int zLevel, int left, int top, int right, int bottom, int startColor, int endColor) {
- if (!ChattilsConfig.INSTANCE.getRemoveTooltipBackground()) {
+ if (!ChattingConfig.INSTANCE.getRemoveTooltipBackground()) {
drawGradientRect(zLevel, left, top, right, bottom, startColor, endColor);
}
}
diff --git a/src/main/java/cc/woverflow/chattils/mixin/WyvtilsListenerMixin.java b/src/main/java/cc/woverflow/chatting/mixin/WyvtilsListenerMixin.java
index 13a4167..7b22479 100644
--- a/src/main/java/cc/woverflow/chattils/mixin/WyvtilsListenerMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/WyvtilsListenerMixin.java
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.mixin;
+package cc.woverflow.chatting.mixin;
-import cc.woverflow.chattils.utils.RenderHelper;
+import cc.woverflow.chatting.utils.RenderHelper;
import org.spongepowered.asm.mixin.Dynamic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
diff --git a/src/main/kotlin/cc/woverflow/chattils/Chattils.kt b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt
index 5ae5c6b..5fb7c67 100644
--- a/src/main/kotlin/cc/woverflow/chattils/Chattils.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt
@@ -1,15 +1,15 @@
-package cc.woverflow.chattils
-
-import cc.woverflow.chattils.chat.ChatSearchingManager
-import cc.woverflow.chattils.chat.ChatShortcuts
-import cc.woverflow.chattils.chat.ChatTabs
-import cc.woverflow.chattils.command.ChattilsCommand
-import cc.woverflow.chattils.config.ChattilsConfig
-import cc.woverflow.chattils.hook.GuiNewChatHook
-import cc.woverflow.chattils.mixin.GuiNewChatAccessor
-import cc.woverflow.chattils.updater.Updater
-import cc.woverflow.chattils.utils.ModCompatHooks
-import cc.woverflow.chattils.utils.RenderHelper
+package cc.woverflow.chatting
+
+import cc.woverflow.chatting.chat.ChatSearchingManager
+import cc.woverflow.chatting.chat.ChatShortcuts
+import cc.woverflow.chatting.chat.ChatTabs
+import cc.woverflow.chatting.command.ChattingCommand
+import cc.woverflow.chatting.config.ChattingConfig
+import cc.woverflow.chatting.hook.GuiNewChatHook
+import cc.woverflow.chatting.mixin.GuiNewChatAccessor
+import cc.woverflow.chatting.updater.Updater
+import cc.woverflow.chatting.utils.ModCompatHooks
+import cc.woverflow.chatting.utils.RenderHelper
import gg.essential.api.EssentialAPI
import gg.essential.universal.UDesktop
import gg.essential.universal.UResolution
@@ -36,14 +36,14 @@ import java.util.*
@Mod(
- modid = Chattils.ID,
- name = Chattils.NAME,
- version = Chattils.VER,
+ modid = Chatting.ID,
+ name = Chatting.NAME,
+ version = Chatting.VER,
modLanguageAdapter = "gg.essential.api.utils.KotlinAdapter"
)
-object Chattils {
+object Chatting {
- val keybind = KeyBinding("Screenshot Chat", Keyboard.KEY_NONE, "Chattils")
+ val keybind = KeyBinding("Screenshot Chat", Keyboard.KEY_NONE, "Chatting")
const val NAME = "@NAME@"
const val VER = "@VER@"
const val ID = "@ID@"
@@ -67,8 +67,8 @@ object Chattils {
@Mod.EventHandler
fun onInitialization(event: FMLInitializationEvent) {
- ChattilsConfig.preload()
- ChattilsCommand.register()
+ ChattingConfig.preload()
+ ChattingCommand.register()
ClientRegistry.registerKeyBinding(keybind)
EVENT_BUS.register(this)
ChatTabs.initialize()
@@ -93,7 +93,7 @@ object Chattils {
}
fun getChatHeight(opened: Boolean): Int {
- var height = if (opened) ChattilsConfig.focusedHeight else ChattilsConfig.unfocusedHeight
+ var height = if (opened) ChattingConfig.focusedHeight else ChattingConfig.unfocusedHeight
height = (height * Minecraft.getMinecraft().gameSettings.chatScale).toInt()
val chatY = ModCompatHooks.yOffset + ModCompatHooks.chatPosition
if (height + chatY + 27 > (UResolution.scaledHeight / Minecraft.getMinecraft().gameSettings.chatScale).toInt() - 27 - chatY) {
@@ -118,7 +118,7 @@ object Chattils {
val chat = hud.chatGUI
val chatLines = ArrayList<String>()
ChatSearchingManager.filterMessages((chat as GuiNewChatHook).prevText, (chat as GuiNewChatAccessor).drawnChatLines)?.let { drawnLines ->
- val chatHeight = if (ChattilsConfig.customChatHeight) getChatHeight(true) / 9 else GuiNewChat.calculateChatboxHeight(Minecraft.getMinecraft().gameSettings.chatHeightFocused / 9)
+ val chatHeight = if (ChattingConfig.customChatHeight) getChatHeight(true) / 9 else GuiNewChat.calculateChatboxHeight(Minecraft.getMinecraft().gameSettings.chatHeightFocused / 9)
for (i in scrollPos until drawnLines.size.coerceAtMost(scrollPos + chatHeight)) {
chatLines.add(drawnLines[i].chatComponent.formattedText)
}
@@ -131,7 +131,7 @@ object Chattils {
private fun screenshot(messages: List<String>, width: Int): BufferedImage? {
if (messages.isEmpty()) {
- EssentialAPI.getNotifications().push("Chattils", "Chat window is empty.")
+ EssentialAPI.getNotifications().push("Chatting", "Chat window is empty.")
return null
}
@@ -150,9 +150,9 @@ object Chattils {
Minecraft.getMinecraft().entityRenderer.setupOverlayRendering()
Minecraft.getMinecraft().framebuffer.bindFramebuffer(true)
EssentialAPI.getNotifications()
- .push("Chattils", "Chat screenshotted successfully." + (if (ChattilsConfig.copyMode != 1) "\nClick to open." else "")) {
+ .push("Chatting", "Chat screenshotted successfully." + (if (ChattingConfig.copyMode != 1) "\nClick to open." else "")) {
if (!UDesktop.open(file)) {
- EssentialAPI.getNotifications().push("Chattils", "Could not browse!")
+ EssentialAPI.getNotifications().push("Chatting", "Could not browse!")
}
}
return image
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatRegexes.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatRegexes.kt
index 0776fa0..a0a8e86 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatRegexes.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatRegexes.kt
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
data class ChatRegexes(val regexList: List<String>?) {
val compiledRegexList: MutableList<Regex> = arrayListOf()
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatSearchingManager.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt
index 646c218..1e08719 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatSearchingManager.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
-import cc.woverflow.chattils.hook.GuiNewChatHook
+import cc.woverflow.chatting.hook.GuiNewChatHook
import gg.essential.lib.caffeine.cache.Cache
import gg.essential.lib.caffeine.cache.Caffeine
import gg.essential.universal.wrappers.message.UTextComponent
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatShortcuts.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatShortcuts.kt
index 50cb73c..f72967f 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatShortcuts.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatShortcuts.kt
@@ -1,13 +1,13 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.utils.ListenableArrayList
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.utils.ListenableArrayList
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import java.io.File
object ChatShortcuts {
- private val shortcutsFile = File(Chattils.modDir, "chatshortcuts.json")
+ private val shortcutsFile = File(Chatting.modDir, "chatshortcuts.json")
private val PARSER = JsonParser()
private var initialized = false
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTab.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTab.kt
index 87f28a1..1389233 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTab.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTab.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
-import cc.woverflow.chattils.gui.components.TabButton
+import cc.woverflow.chatting.gui.components.TabButton
import com.google.gson.annotations.SerializedName
import kotlinx.coroutines.runBlocking
import net.minecraft.client.Minecraft
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTabs.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTabs.kt
index ada0baa..5525a51 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTabs.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTabs.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
-import cc.woverflow.chattils.Chattils
+import cc.woverflow.chatting.Chatting
import com.google.gson.GsonBuilder
import com.google.gson.JsonArray
import com.google.gson.JsonObject
@@ -24,7 +24,7 @@ object ChatTabs {
}
private var initialized = false
- private val tabFile = File(Chattils.modDir, "chattabs.json")
+ private val tabFile = File(Chatting.modDir, "chattabs.json")
fun initialize() {
if (initialized) {
diff --git a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTabsJson.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTabsJson.kt
index a63913b..e37ef7f 100644
--- a/src/main/kotlin/cc/woverflow/chattils/chat/ChatTabsJson.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatTabsJson.kt
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.chat
+package cc.woverflow.chatting.chat
import com.google.gson.JsonArray
import com.google.gson.annotations.SerializedName
diff --git a/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt b/src/main/kotlin/cc/woverflow/chatting/command/ChattingCommand.kt
index 67dd30e..ba697e1 100644
--- a/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/command/ChattingCommand.kt
@@ -1,17 +1,17 @@
-package cc.woverflow.chattils.command
+package cc.woverflow.chatting.command
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.config.ChattilsConfig
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.config.ChattingConfig
import gg.essential.api.EssentialAPI
import gg.essential.api.commands.Command
import gg.essential.api.commands.DefaultHandler
-object ChattilsCommand : Command(Chattils.ID, true) {
+object ChattingCommand : Command(Chatting.ID, true) {
override val commandAliases: Set<Alias> = setOf(Alias("stratus"))
@DefaultHandler
fun handle() {
- EssentialAPI.getGuiUtil().openScreen(ChattilsConfig.gui())
+ EssentialAPI.getGuiUtil().openScreen(ChattingConfig.gui())
}
} \ No newline at end of file
diff --git a/src/main/kotlin/cc/woverflow/chattils/config/ChattilsConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index d662755..846297b 100644
--- a/src/main/kotlin/cc/woverflow/chattils/config/ChattilsConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -1,12 +1,12 @@
-package cc.woverflow.chattils.config
-
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.chat.ChatShortcuts
-import cc.woverflow.chattils.chat.ChatTab
-import cc.woverflow.chattils.chat.ChatTabs
-import cc.woverflow.chattils.gui.ChatShortcutViewGui
-import cc.woverflow.chattils.updater.DownloadGui
-import cc.woverflow.chattils.updater.Updater
+package cc.woverflow.chatting.config
+
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.chat.ChatShortcuts
+import cc.woverflow.chatting.chat.ChatTab
+import cc.woverflow.chatting.chat.ChatTabs
+import cc.woverflow.chatting.gui.ChatShortcutViewGui
+import cc.woverflow.chatting.updater.DownloadGui
+import cc.woverflow.chatting.updater.Updater
import gg.essential.api.EssentialAPI
import gg.essential.vigilance.Vigilant
import gg.essential.vigilance.data.Category
@@ -15,7 +15,7 @@ import gg.essential.vigilance.data.PropertyType
import gg.essential.vigilance.data.SortingBehavior
import java.io.File
-object ChattilsConfig : Vigilant(File(Chattils.modDir, "${Chattils.ID}.toml"), Chattils.NAME, sortingBehavior = ConfigSorting) {
+object ChattingConfig : Vigilant(File(Chatting.modDir, "${Chatting.ID}.toml"), Chatting.NAME, sortingBehavior = ConfigSorting) {
@Property(
type = PropertyType.SELECTOR,
@@ -159,7 +159,7 @@ object ChattilsConfig : Vigilant(File(Chattils.modDir, "${Chattils.ID}.toml"), C
if (Updater.shouldUpdate) EssentialAPI.getGuiUtil()
.openScreen(DownloadGui()) else EssentialAPI.getNotifications()
.push(
- Chattils.NAME,
+ Chatting.NAME,
"No update had been detected at startup, and thus the update GUI has not been shown."
)
}
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutEditGui.kt b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt
index aa4b933..d75339b 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutEditGui.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.gui
+package cc.woverflow.chatting.gui
-import cc.woverflow.chattils.chat.ChatShortcuts
+import cc.woverflow.chatting.chat.ChatShortcuts
import gg.essential.api.EssentialAPI
import gg.essential.api.gui.buildConfirmationModal
import gg.essential.elementa.ElementaVersion
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutViewGui.kt b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutViewGui.kt
index f4ad049..a4a9f70 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/ChatShortcutViewGui.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutViewGui.kt
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.gui
+package cc.woverflow.chatting.gui
-import cc.woverflow.chattils.chat.ChatShortcuts
-import cc.woverflow.chattils.gui.components.TextBlock
+import cc.woverflow.chatting.chat.ChatShortcuts
+import cc.woverflow.chatting.gui.components.TextBlock
import gg.essential.api.EssentialAPI
import gg.essential.elementa.ElementaVersion
import gg.essential.elementa.WindowScreen
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/components/CleanButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt
index 7011518..b67510a 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/components/CleanButton.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/CleanButton.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.gui.components
+package cc.woverflow.chatting.gui.components
-import cc.woverflow.chattils.Chattils
+import cc.woverflow.chatting.Chatting
import club.sk1er.patcher.config.PatcherConfig
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiButton
@@ -41,7 +41,7 @@ open class CleanButton(buttonId: Int, private val x: () -> Int, private val y: (
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f)
hovered =
mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height
- if (!Chattils.isPatcher || !PatcherConfig.transparentChatInputField) {
+ if (!Chatting.isPatcher || !PatcherConfig.transparentChatInputField) {
drawRect(
xPosition,
yPosition,
@@ -64,7 +64,7 @@ open class CleanButton(buttonId: Int, private val x: () -> Int, private val y: (
}
companion object {
- private val hoveredColor = Color(255, 255, 255, 128).rgb
- private val color = Color(0, 0, 0, 128).rgb
+ val hoveredColor = Color(255, 255, 255, 128).rgb
+ val color = Color(0, 0, 0, 128).rgb
}
} \ No newline at end of file
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/components/ScreenshotButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/ScreenshotButton.kt
index 0e6f088..379444c 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/components/ScreenshotButton.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/ScreenshotButton.kt
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.gui.components
+package cc.woverflow.chatting.gui.components
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.mixin.GuiNewChatAccessor
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.mixin.GuiNewChatAccessor
import gg.essential.api.utils.GuiUtil
import gg.essential.universal.UResolution
import net.minecraft.client.Minecraft
@@ -16,7 +16,7 @@ class ScreenshotButton :
override fun onMousePress() {
val chat = Minecraft.getMinecraft().ingameGUI.chatGUI
if (GuiUtil.getOpenedScreen() is GuiChat) {
- Chattils.screenshotChat((chat as GuiNewChatAccessor).scrollPos)
+ Chatting.screenshotChat((chat as GuiNewChatAccessor).scrollPos)
}
}
@@ -28,7 +28,7 @@ class ScreenshotButton :
} else {
GlStateManager.color(1f, 1f, 1f)
}
- mc.textureManager.bindTexture(ResourceLocation(Chattils.ID, "screenshot.png"))
+ mc.textureManager.bindTexture(ResourceLocation(Chatting.ID, "screenshot.png"))
Gui.drawModalRectWithCustomSizedTexture(xPosition + 1, yPosition + 1, 0f, 0f, 10, 10, 10f, 10f)
}
}
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/components/SearchButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/SearchButton.kt
index 04a2743..a0f875e 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/components/SearchButton.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/SearchButton.kt
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.gui.components
+package cc.woverflow.chatting.gui.components
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.hook.GuiNewChatHook
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.hook.GuiNewChatHook
import gg.essential.universal.UResolution
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.Gui
@@ -30,7 +30,7 @@ class SearchButton :
inputField.drawTextBox()
super.drawButton(mc, mouseX, mouseY)
if (visible) {
- mc.textureManager.bindTexture(ResourceLocation(Chattils.ID, "search.png"))
+ mc.textureManager.bindTexture(ResourceLocation(Chatting.ID, "search.png"))
if (isEnabled()) {
GlStateManager.color(224f / 255f, 224f / 255f, 224f / 255f)
} else if (mouseX >= xPosition && mouseX <= xPosition + 10 && mouseY >= yPosition && mouseY <= yPosition + 10) {
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/components/TabButton.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/TabButton.kt
index 4770900..5342629 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/components/TabButton.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/TabButton.kt
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.gui.components
+package cc.woverflow.chatting.gui.components
-import cc.woverflow.chattils.chat.ChatTab
-import cc.woverflow.chattils.chat.ChatTabs
+import cc.woverflow.chatting.chat.ChatTab
+import cc.woverflow.chatting.chat.ChatTabs
import gg.essential.universal.UResolution
class TabButton(buttonId: Int, x: Int, widthIn: Int, heightIn: Int, private val chatTab: ChatTab) :
diff --git a/src/main/kotlin/cc/woverflow/chattils/gui/components/TextBlock.kt b/src/main/kotlin/cc/woverflow/chatting/gui/components/TextBlock.kt
index c83d22d..8a4f32a 100644
--- a/src/main/kotlin/cc/woverflow/chattils/gui/components/TextBlock.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/gui/components/TextBlock.kt
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.gui.components
+package cc.woverflow.chatting.gui.components
import gg.essential.elementa.components.UIBlock
import gg.essential.elementa.components.UIText
diff --git a/src/main/kotlin/cc/woverflow/chattils/updater/DownloadGui.kt b/src/main/kotlin/cc/woverflow/chatting/updater/DownloadGui.kt
index c7f59ec..10f2f6f 100644
--- a/src/main/kotlin/cc/woverflow/chattils/updater/DownloadGui.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/updater/DownloadGui.kt
@@ -1,6 +1,6 @@
-package cc.woverflow.chattils.updater
+package cc.woverflow.chatting.updater
-import cc.woverflow.chattils.Chattils
+import cc.woverflow.chatting.Chatting
import gg.essential.api.EssentialAPI
import gg.essential.api.gui.buildConfirmationModal
import gg.essential.api.utils.Multithreading
@@ -15,32 +15,32 @@ class DownloadGui : WindowScreen(ElementaVersion.V1, true, true, true, -1) {
EssentialAPI.getEssentialComponentFactory().buildConfirmationModal {
this.text = "Are you sure you want to update?"
this.secondaryText =
- "(This will update from v${Chattils.VER} to ${Updater.latestTag})"
+ "(This will update from v${Chatting.VER} to ${Updater.latestTag})"
this.onConfirm = {
restorePreviousScreen()
Multithreading.runAsync {
if (Updater.download(
Updater.updateUrl,
File(
- "mods/${Chattils.NAME}-${
+ "mods/${Chatting.NAME}-${
Updater.latestTag!!.substringAfter("v")
}.jar"
)
) && Updater.download(
"https://github.com/Wyvest/Deleter/releases/download/v1.2/Deleter-1.2.jar",
- File(Chattils.modDir.parentFile, "Deleter-1.2.jar")
+ File(Chatting.modDir.parentFile, "Deleter-1.2.jar")
)
) {
EssentialAPI.getNotifications()
.push(
- Chattils.NAME,
+ Chatting.NAME,
"The ingame updater has successfully installed the newest version."
)
Updater.addShutdownHook()
Updater.shouldUpdate = false
} else {
EssentialAPI.getNotifications().push(
- Chattils.NAME,
+ Chatting.NAME,
"The ingame updater has NOT installed the newest version as something went wrong."
)
}
diff --git a/src/main/kotlin/cc/woverflow/chattils/updater/Updater.kt b/src/main/kotlin/cc/woverflow/chatting/updater/Updater.kt
index 35b6e79..ef1e376 100644
--- a/src/main/kotlin/cc/woverflow/chattils/updater/Updater.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/updater/Updater.kt
@@ -1,12 +1,12 @@
-package cc.woverflow.chattils.updater
+package cc.woverflow.chatting.updater
-import cc.woverflow.chattils.Chattils
-import cc.woverflow.chattils.config.ChattilsConfig
+import cc.woverflow.chatting.Chatting
+import cc.woverflow.chatting.config.ChattingConfig
import gg.essential.api.EssentialAPI
import gg.essential.api.utils.Multithreading
import gg.essential.api.utils.WebUtil.downloadToFile
import gg.essential.api.utils.WebUtil.fetchJSON
-import gg.essential.universal.UDesktop.open
+import gg.essential.universal.UDesktop
import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion
import java.io.File
@@ -21,13 +21,13 @@ object Updater {
Multithreading.runAsync {
try {
val latestRelease =
- fetchJSON("https://api.github.com/repos/W-OVERFLOW/${Chattils.ID}/releases/latest").getObject()
+ fetchJSON("https://api.github.com/repos/W-OVERFLOW/${Chatting.ID}/releases/latest").getObject()
latestTag = latestRelease["tag_name"].asString
val currentVersion =
- DefaultArtifactVersion(Chattils.VER.substringBefore("-"))
+ DefaultArtifactVersion(Chatting.VER.substringBefore("-"))
val latestVersion = DefaultArtifactVersion(latestTag!!.substringAfter("v").substringBefore("-"))
if (currentVersion >= latestVersion) {
- if (currentVersion != latestVersion || !Chattils.VER.contains("-")) {
+ if (currentVersion != latestVersion || !Chatting.VER.contains("-")) {
return@runAsync
}
}
@@ -35,10 +35,10 @@ object Updater {
latestRelease["assets"].asJsonArray[0].asJsonObject["browser_download_url"]
.asString
if (updateUrl.isNotEmpty()) {
- if (ChattilsConfig.showUpdate) {
+ if (ChattingConfig.showUpdate) {
EssentialAPI.getNotifications().push(
- Chattils.NAME,
- "${Chattils.NAME} has a new update ($latestTag)! Click here to download it automatically!"
+ Chatting.NAME,
+ "${Chatting.NAME} has a new update ($latestTag)! Click here to download it automatically!"
) { EssentialAPI.getGuiUtil().openScreen(DownloadGui()) }
}
shouldUpdate = true
@@ -54,7 +54,7 @@ object Updater {
if (file.exists()) return true
url = url.replace(" ", "%20")
try {
- downloadToFile(url, file, "${Chattils.NAME}/${Chattils.VER}")
+ downloadToFile(url, file, "${Chatting.NAME}/${Chatting.VER}")
} catch (e: Exception) {
e.printStackTrace()
return false
@@ -62,26 +62,21 @@ object Updater {
return file.exists()
}
- /**
- * Adapted from RequisiteLaunchwrapper under LGPLv3
- * https://github.com/Qalcyo/RequisiteLaunchwrapper/blob/main/LICENSE
- */
fun addShutdownHook() {
- Runtime.getRuntime().addShutdownHook(Thread {
+ EssentialAPI.getShutdownHookUtil().register {
println("Opening Deleter task...")
try {
val runtime = javaRuntime
if (Minecraft.isRunningOnMac) {
- open(Chattils.jarFile.parentFile)
+ UDesktop.open(Chatting.jarFile.parentFile)
}
- val file = File(Chattils.modDir.parentFile, "Deleter-1.2.jar")
+ val file = File(Chatting.modDir.parentFile, "Deleter-1.2.jar")
Runtime.getRuntime()
- .exec("\"" + runtime + "\" -jar \"" + file.absolutePath + "\" \"" + Chattils.jarFile.absolutePath + "\"")
+ .exec("\"" + runtime + "\" -jar \"" + file.absolutePath + "\" \"" + Chatting.jarFile.absolutePath + "\"")
} catch (e: Exception) {
e.printStackTrace()
}
- Thread.currentThread().interrupt()
- })
+ }
}
/**
diff --git a/src/main/kotlin/cc/woverflow/chattils/utils/ImageTransferable.kt b/src/main/kotlin/cc/woverflow/chatting/utils/ImageTransferable.kt
index b23e56e..563f17a 100644
--- a/src/main/kotlin/cc/woverflow/chattils/utils/ImageTransferable.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/utils/ImageTransferable.kt
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.utils
+package cc.woverflow.chatting.utils
import java.awt.Image
import java.awt.datatransfer.DataFlavor
diff --git a/src/main/kotlin/cc/woverflow/chattils/utils/ListenableArrayList.kt b/src/main/kotlin/cc/woverflow/chatting/utils/ListenableArrayList.kt
index 3b270fd..0cd598c 100644
--- a/src/main/kotlin/cc/woverflow/chattils/utils/ListenableArrayList.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/utils/ListenableArrayList.kt
@@ -1,4 +1,4 @@
-package cc.woverflow.chattils.utils
+package cc.woverflow.chatting.utils
class ListenableArrayList<T>(private val runnable: (ListenableArrayList<T>) -> Unit, vararg elements: T): ArrayList<T>() {
override fun add(element: T): Boolean {
diff --git a/src/main/kotlin/cc/woverflow/chattils/utils/ModCompatHooks.kt b/src/main/kotlin/cc/woverflow/chatting/utils/ModCompatHooks.kt
index 65c80f0..e69a36b 100644
--- a/src/main/kotlin/cc/woverflow/chattils/utils/ModCompatHooks.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/utils/ModCompatHooks.kt
@@ -1,11 +1,11 @@
-package cc.woverflow.chattils.utils
+package cc.woverflow.chatting.utils
import club.sk1er.patcher.config.PatcherConfig
import com.llamalad7.betterchat.BetterChat
-import cc.woverflow.chattils.Chattils.isBetterChat
-import cc.woverflow.chattils.Chattils.isPatcher
-import cc.woverflow.chattils.config.ChattilsConfig.textRenderType
-import cc.woverflow.chattils.utils.RenderHelper.drawBorderedString
+import cc.woverflow.chatting.Chatting.isBetterChat
+import cc.woverflow.chatting.Chatting.isPatcher
+import cc.woverflow.chatting.config.ChattingConfig.textRenderType
+import cc.woverflow.chatting.utils.RenderHelper.drawBorderedString
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
diff --git a/src/main/kotlin/cc/woverflow/chattils/utils/RenderHelper.kt b/src/main/kotlin/cc/woverflow/chatting/utils/RenderHelper.kt
index 41325ca..53870c1 100644
--- a/src/main/kotlin/cc/woverflow/chattils/utils/RenderHelper.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/utils/RenderHelper.kt
@@ -1,7 +1,7 @@
-package cc.woverflow.chattils.utils
+package cc.woverflow.chatting.utils
-import cc.woverflow.chattils.config.ChattilsConfig
-import cc.woverflow.chattils.hook.GuiNewChatHook
+import cc.woverflow.chatting.config.ChattingConfig
+import cc.woverflow.chatting.hook.GuiNewChatHook
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.renderer.GlStateManager
@@ -186,7 +186,7 @@ object RenderHelper {
bufferedimage.setRGB(l, k - j, pixelValues[k * framebuffer.framebufferTextureWidth + l])
}
}
- if (ChattilsConfig.copyMode != 1) {
+ if (ChattingConfig.copyMode != 1) {
try {
file.parentFile.mkdirs()
ImageIO.write(bufferedimage, "png", file)
diff --git a/src/main/resources/assets/chattils/copy.png b/src/main/resources/assets/chattils/copy.png
deleted file mode 100644
index f21d724..0000000
--- a/src/main/resources/assets/chattils/copy.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/chattils/screenshot.png b/src/main/resources/assets/chattils/screenshot.png
deleted file mode 100644
index 8b6cc48..0000000
--- a/src/main/resources/assets/chattils/screenshot.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/chatting/copy.png b/src/main/resources/assets/chatting/copy.png
new file mode 100644
index 0000000..cb1a1a4
--- /dev/null
+++ b/src/main/resources/assets/chatting/copy.png
Binary files differ
diff --git a/src/main/resources/assets/chatting/screenshot.png b/src/main/resources/assets/chatting/screenshot.png
new file mode 100644
index 0000000..b0a2f22
--- /dev/null
+++ b/src/main/resources/assets/chatting/screenshot.png
Binary files differ
diff --git a/src/main/resources/assets/chattils/search.png b/src/main/resources/assets/chatting/search.png
index a5be877..a5be877 100644
--- a/src/main/resources/assets/chattils/search.png
+++ b/src/main/resources/assets/chatting/search.png
Binary files differ
diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info
index 341b47f..8b9aff4 100644
--- a/src/main/resources/mcmod.info
+++ b/src/main/resources/mcmod.info
@@ -10,7 +10,7 @@
"authorList": [
"W-OVERFLOW"
],
- "credits": "",
+ "credits": "Mo2men#2806 for copy and screenshot images.",
"logoFile": "",
"screenshots": [],
"dependencies": []
diff --git a/src/main/resources/mixins.chattils.json b/src/main/resources/mixins.chatting.json
index eea156a..3a488ae 100644
--- a/src/main/resources/mixins.chattils.json
+++ b/src/main/resources/mixins.chatting.json
@@ -1,7 +1,7 @@
{
"compatibilityLevel": "JAVA_8",
"minVersion": "0.8",
- "package": "cc.woverflow.chattils.mixin",
+ "package": "cc.woverflow.chatting.mixin",
"refmap": "mixins.${id}.refmap.json",
"mixins": [
"ClientCommandHandlerMixin",