Skip to content

Commit

Permalink
1.5.6 - So many fixes!!
Browse files Browse the repository at this point in the history
- Mod Menu integrated config now has some informational links for formatting the time and format-able string options
- Option class has been removed and replaced with an "abstract" one as a nested class. has the same functionality as before but now is properly utilized
- new "abstract" options are made dynamically through the Reflection API by the use of field names and values
- renamed shiftHudPos to shiftChat, and specific "Str" and "Format" options to end with "Date" or "Format" instead for clarity and common sense
- now when the config has been updated (or cannot be loaded), the original will be saved as wmch_old.json so settings can be migrated over
- moved updateConfigBuilder method to ClothConfig and expanded it to updateBuilder, with save consumers coded directly into the builder
- removed validate method and moved functionality into newConfig
- revised readFromFile into read and added better actions on error handling
- removed NoChatReports config accessor class for reading the convertToGameMessage setting, now instead of only formatting system messages if that returned
true, it will always format system messages if the other criteria is met
- added getVisibleMessages to the ChatHudAccessor mixin for ###
- heavily condensed shiftChat ModifyVariable mixins from 7 to 3 by targeting the variables instead of each method arg
- overhauled the playername message formatter to keep complex message styles intact (###)
- removed old and unused integration classes
- simplified ChatLog method calls
- fixed and simplified some potentially inverted message comparisons
- moved the part of WMCH.java that restored the chatlog into the new restore method
- after restoring all messages, resets each message's sent time to prevent immediate loading (###)
- added a Util.Flag.BOUNDARY_LINE to replace isBoundaryLine
- tweaked some Flag methods
- tweaked most methods to work better or to fix something
- replaced the entirety of the content of formatString with a text builder that uses the built in section-sign symbol to format text objects
- added the lastWorld field, which retains information about the current and last world/server joined for ### and fixing extras being sent on minigame servers
- simplified the boundary line adder

note: i am going to try my hardest to push a ton of commits changing tiny things to avoid monthly, enormous commits of somewhat unclear changes
  • Loading branch information
mrbuilder1961 committed Dec 18, 2022
1 parent 139fa07 commit e093815
Show file tree
Hide file tree
Showing 21 changed files with 755 additions and 1,139 deletions.
48 changes: 26 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Fabric Mod](https://img.shields.io/badge/modloader-fabric-eeeeee)](https://fabricmc.net/use/)
[![Latest Version](https://img.shields.io/badge/version-1.5.5-blueviolet)](https://github.com/mrbuilder1961/WheresMyChatHistory/releases)
[![Latest Version](https://img.shields.io/badge/version-1.5.6-blueviolet)](https://github.com/mrbuilder1961/WheresMyChatHistory/releases)
[![Curseforge Download](https://img.shields.io/badge/curseforge-6083_downloads-blue)](https://www.curseforge.com/minecraft/mc-mods/wmch)
[![Modrinth Download](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=modrinth&suffix=%20downloads&query=downloads&url=https://api.modrinth.com/v2/project/MOqt4Z5n&cacheSeconds=3600)](https://www.modrinth.com/mod/MOqt4Z5n)
# Where's My Chat History
Expand All @@ -16,7 +16,9 @@ Be on the lookout for new versions, issues, and possible future features!

## Localization and Translation

If you would like to help translate WMCH into other languages, head to [our CrowdIn page](https://crwd.in/wmch) and see how you can contribute!
If you would like to help translate WMCH into other languages, you can:
- Create a pull request that adds or corrects a language file
- Head over to [the CrowdIn page](https://crwd.in/wmch) and see how you can contribute

## Setup developer workspace

Expand All @@ -27,30 +29,32 @@ If you would like to help translate WMCH into other languages, head to [our Crow

## Configuration help

| Name | Default Value | Description | Lang Key |
|---|---|---|---|
| Timestamp toggle | `true` | Should a timestamp in front of all messages show? | `text.wmch.time` |
| Timestamp text | `[HH:mm:ss]` | The text that is used for the timestamp. For dynamic text, search online for 'java date format string'. | `text.wmch.timeStr` |
| Timestamp color | `0xFF55FF` (`16733695`) | The color that's 'filled in' where applicable in the timestamp text. | `text.wmch.timeColor` |
| Timestamp modifiers | `` | The string of ampersands (&) and formatting codes that apply over the time string. | `text.wmch.timeFormat` |
| Hover toggle | `true` | Should the text that appears when you hover over the timestamp show? | `text.wmch.hover` |
| Hover text | `MM/dd/yyyy` | The text that appears when hovering over timestamp text. For dynamic text, search online for 'java date format string'. | `text.wmch.hoverStr` |
| Message counter toggle | `true` | Should a message counter show after a message to indicate multiple were sent? | `text.wmch.counter` |
| Message counter text | `&8(&7x&e$&8)` | The text that's added to the end of a message to indicate multiple duplicates were sent. Must include a $ for the number of duplicates. | `text.wmch.counterStr` |
| Message counter color | `0xFFFF55` (`16777045`) | The color that's 'filled in' where applicable in the counter text, for example '&r' will be replaced with this color. | `text.wmch.counterColor` |
| Boundary toggle | `true` | Should a boundary line show after using chat, leaving, and then joining again later? | `text.wmch.boundary` |
| Boundary text | `&b[==============]` | The text that is shown when a boundary line is inserted into the chat, add ampersands (&) followed by a formatting code to prettify it. | `text.wmch.boundaryStr` |
| Boundary color | `0x55FFFF` (`5636095`) | The color that's 'filled in' where applicable in the boundary text, for example '&r' will be replaced with this color. | `text.wmch.boundaryColor` |
| Chat log toggle | `false` | Should the chat be saved into a log so it can be re-added back into the chat in another game session? | `text.wmch.saveChat` |
| Shift chat interface | `true` | Should that chat interface be shifted up about 10 pixels to not obstruct the armor bar? | `text.wmch.shiftHudPos` |
| Playername text | `$` | The text that replaces the playername in chat messages. Vanilla is <$>, no brackets is $; where $ represents the playername. Only applies to player messages. | `text.wmch.nameStr` |
| Maximum chat messages | `16384` | The max amount of chat messages allowed to render. Vanilla has this set as 100, maximum allowed is 32,767. Keep in mind the higher the value, the more memory the chat requires. | `text.wmch.maxMsgs` |
| Name | Default Value | Description | Lang Key |
|---------------------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
| Timestamp toggle | `true` | Should a timestamp in front of all messages show? | `text.wmch.time` |
| Hover toggle | `true` | Should text appear stating a more detailed time description when you hover over the timestamp text in chat? | `text.wmch.hover` |
| Message counter toggle | `true` | Should a message counter show after messages to indicate multiple duplicates were sent? | `text.wmch.counter` |
| Boundary toggle | `true` | Should a boundary line show after chatting, leaving a world/server, and then joining another world/server later? | `text.wmch.boundary` |
| Timestamp text | `HH:mm:ss` | The text that is formatted into a timestamp. | `text.wmch.timeDate` |
| Hover text | `MM/dd/yyyy` | The text that is formatted into a longer date/time string. | `text.wmch.hoverDate` |
| Message counter text | `&8(&7x&e$&8)` | The text that's added to the end of a message to indicate multiple duplicates were sent. Requires a $ for the number of duplicates, also supports '&'s + formatting codes to modify it. | `text.wmch.counterStr` |
| Boundary text | `&8[&b$&8]` | The text that is formatted and used for the boundary line. Supports '&' + formatting codes to modify it. | `text.wmch.boundaryStr` |
| Timestamp decoration text | `[$]` | The string of '&'s + formatting codes and decoration text that create the timestamp. The $ is a placeholder for the formatted timestamp Option above this one. | `text.wmch.timeFormat` |
| Hover decoration text | `$` | The string of '&'s + formatting codes and decoration text that create the detailed hover description. Requires a $ as a placeholder for the formatted timestamp Option above this one. | `text.wmch.hoverFormat` |
| Timestamp color | `0xFF55FF` (`16733695`) | The color that's filled in where it would otherwise be blank white in the resulting timestamp. | `text.wmch.timeColor` |
| Hover text color | `0xFFFFFF` (`16777215`) | The color that's filled in where it would otherwise be blank white in the resulting hover text. | `text.wmch.hoverColor` |
| Message counter color | `0xFFFF55` (`16777045`) | The color that's filled in where it would otherwise be blank white in the resulting duplicate counter. | `text.wmch.counterColor` |
| Boundary color | `0x55FFFF` (`5636095`) | The color that's filled in where it would otherwise be blank white in the resulting boundary line. | `text.wmch.boundaryColor` |
| Chat log toggle | `true` | Should the chat be saved into a log so it can be re-added back into the chat in another game session? | `text.wmch.saveChat` |
| Shift chat | `10` | Shifts the chat interface up to not obstruct the armor bar and/or health. Default is 10, set to 0 for no shift. | `text.wmch.shiftChat` |
| Playername text | `$` | The text that replaces the playername in chat messages. Vanilla is <$>, no triangle brackets is $; where $ is a placeholder for the playername. Only applies to player sent messages. | `text.wmch.nameStr` |
| Maximum chat messages | `0x4000` | The max amount of chat messages allowed to render. Vanilla is capped at 100, the true maximum is 32767. Keep in mind the higher the number, the more memory the chat will require to store all the messages. | `text.wmch.maxMsgs` |

## Possible features
- Localize logging messages?
- Make certain messages copiable by default (on-click), such as the Open-To-LAN port
- Make certain messages copyable by default (on-click), such as the Open-To-LAN port
- Chat search feature, with regex search capabilities
- animate message recieve
- animate message receive
- add buttons to the edge of chat input box OR in multiplayer menu screen (for WMCH settings and chat searcher)
- buttons/variable input strings to easily message data (ex. coords or UUID)

Expand Down
29 changes: 16 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
id "fabric-loom" version "1.0-SNAPSHOT"
id "maven-publish"
}

sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -10,33 +10,34 @@ archivesBaseName = project.archivesBaseName
group = project.group
version = "$project.archivesBaseName-$project.minecraft-$project.version"

def integrationsFile = file("./random/integration.properties")


repositories {
mavenCentral()
maven { url "https://maven.shedaniel.me/" } // cloth-config
maven { url "https://maven.terraformersmc.com/releases/" } // modmenu
maven { url 'https://jitpack.io' } // MixinExtras
maven { url 'https://repo.essential.gg/repository/maven-public' } // MixinExtras
maven { url "https://jitpack.io" } // MixinExtras
maven { url "https://repo.essential.gg/repository/maven-public" } // MixinExtras
//maven { url "https://minecraft.guntram.de/maven/" } // CrowdinTranslate
maven { url "https://maven.shedaniel.me/" } // Cloth Config API
maven { url "https://maven.terraformersmc.com/releases/" } // Mod Menu
}

def integrationsFile = file("./random/integration.properties")

dependencies {
minecraft "com.mojang:minecraft:$project.minecraft"
mappings "net.fabricmc:yarn:$project.minecraft$project.yarn:v2"
modImplementation "net.fabricmc:fabric-loader:$project.loader"
modImplementation "net.fabricmc.fabric-api:fabric-api:$project.api$project.minecraft"

include(annotationProcessor( implementation("com.github.LlamaLad7:MixinExtras:0.1.0") ))
//include( modImplementation("de.guntram.mcmod:crowdin-translate:$project.crowdin") )

modImplementation "net.fabricmc.fabric-api:fabric-api:$project.api$project.minecraft"
modApi("me.shedaniel.cloth:cloth-config-fabric:$project.cloth_config") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation "com.terraformersmc:modmenu:$project.modmenu"


// integration files, togglable in /random/integrations.properties
// integration files, toggleable in /random/integrations.properties
if( integrationsFile.exists() ) {
println "Started loading dev testing integrations..."

Expand All @@ -48,12 +49,14 @@ dependencies {
def properties = integration.toString().split("=")
def data = properties[1].split(",")
def loc = (data[0].substring(data[0].indexOf("[")+1, data[0].indexOf("]"))).split("\\|") .stream().map({f -> f.endsWith(".jar") ? "random/integrations/" + f : f}).toList()
def enabled = data[1]
def enabled = Boolean.valueOf(data[1])
def func = data.size() > 2 ? data[2] : "modImplementation"

def i=0;
def i = 0
for(f in loc) {
"${func}" ( f.endsWith(".jar") ? files(f) : f )
if(enabled) {
"${func}" ( f.endsWith(".jar") ? files(f) : f )
}

println ("\t-> " + (enabled ? "Loaded" : "Skipped") + " integration '${properties[0]}${i>0 ? "_"+i : ""}' at '${loc[i]}'" + (func != "modImplementation" ? " using method '$func'" : ""))

Expand Down
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
org.gradle.jvmargs=-Xmx5G
org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false

archivesBaseName=wmch
group=mechanicalarcane.wmch
version=1.5.5
version=1.5.6

minecraft=1.19.2
yarn=+build.27
loader=0.14.10
api=0.66.0+
loader=0.14.11
api=0.69.0+
crowdin=1.3+1.17

cloth_config=8.2.88
modmenu=4.0.6
modmenu=4.1.0
Loading

1 comment on commit e093815

@mrbuilder1961
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #39 and #40
Implements #34, #36, #37, #38, #41, and #42

Please sign in to comment.