aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-08 11:38:43 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-08 11:38:43 +0700
commit5abc943439c1439a98ca06feb6d740cb3c1fa159 (patch)
treea25a2b63bc7fe11bfc641f20ce09c845fee90870 /src
parentf91dbeef8de0913d584ff797efe8ba0d0d1833c0 (diff)
downloadChatting-5abc943439c1439a98ca06feb6d740cb3c1fa159.tar.gz
Chatting-5abc943439c1439a98ca06feb6d740cb3c1fa159.tar.bz2
Chatting-5abc943439c1439a98ca06feb6d740cb3c1fa159.zip
disable timestamps for now
Diffstat (limited to 'src')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java7
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt5
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/utils/renderutils.kt6
3 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
index 8f92e1e..1052593 100644
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
+++ b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin.java
@@ -71,6 +71,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
handleChatTabMessage(chatComponent, chatLineId, updateCounter, displayOnly, ci);
}
+ /*?
@Unique
private final SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
@ModifyArg(method = "setChatLine", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/ChatLine;<init>(ILnet/minecraft/util/IChatComponent;I)V"))
@@ -81,6 +82,8 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
return iChatComponent;
}
+ */
+
@Inject(method = "drawChat", at = @At("HEAD"))
private void checkScreenshotKeybind(int j2, CallbackInfo ci) {
if (Chatting.INSTANCE.getKeybind().isPressed()) {
@@ -139,7 +142,7 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
private int modifyYeah(int value) {
return chatting$textOpacity = (int) (((float) (getChatOpen() ? 255 : value)) * (mc.gameSettings.chatOpacity * 0.9F + 0.1F));
}
-
+ /*/
@Inject(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;scale(FFF)V"))
private void drawPre(int updateCounter, CallbackInfo ci) {
RenderUtils.timestampPre();
@@ -150,6 +153,8 @@ public abstract class GuiNewChatMixin extends Gui implements GuiNewChatHook {
RenderUtils.timestampPost();
}
+ */
+
@Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawStringWithShadow(Ljava/lang/String;FFI)I"))
private int redirectDrawString(FontRenderer instance, String text, float x, float y, int color) {
return ModCompatHooks.redirectDrawString(text, x, y, color);
diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
index 2b163c5..bc3aa31 100644
--- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt
@@ -104,6 +104,7 @@ object ChattingConfig :
)
var customFormatting = false
+ /*/
@Property(
type = PropertyType.SWITCH,
name = "Show Timestamp",
@@ -120,6 +121,8 @@ object ChattingConfig :
)
var showTimestampHover = true
+ */
+
@Property(
type = PropertyType.SWITCH,
name = "Custom Chat Height",
@@ -251,7 +254,7 @@ object ChattingConfig :
chatShortcuts = funny
ChatShortcuts.initialize()
}
- addDependency("showTimestampHover", "showTimestamp")
+ //addDependency("showTimestampHover", "showTimestamp")
}
private object ConfigSorting : SortingBehavior() {
diff --git a/src/main/kotlin/cc/woverflow/chatting/utils/renderutils.kt b/src/main/kotlin/cc/woverflow/chatting/utils/renderutils.kt
index 7a5f5d4..19835ac 100644
--- a/src/main/kotlin/cc/woverflow/chatting/utils/renderutils.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/utils/renderutils.kt
@@ -216,7 +216,7 @@ fun Framebuffer.screenshot(file: File): BufferedImage {
}
return bufferedimage
}
-
+/*/
private val timePattern = Regex("\\[\\d+:\\d+:\\d+]")
private var lastLines = mutableListOf<ChatLine>()
fun timestampPre() {
@@ -262,4 +262,6 @@ private fun getChatLineOverMouse(mouseX: Int, mouseY: Int): ChatLine? {
return drawnChatLines[m]
}
return null
-} \ No newline at end of file
+}
+
+ */ \ No newline at end of file