Skip to content

Commit

Permalink
Updated mod to v1.4.3
Browse files Browse the repository at this point in the history
See release v1.4.3 for details
  • Loading branch information
mrbuilder1961 committed Jan 9, 2022
1 parent a4ca1ed commit 6188ffe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx3G
loader_version=0.12.12

# Mod Properties
mod_version = 1.4.2
mod_version = 1.4.3
maven_group = obro1961
archives_base_name = wmch
# Dependencies
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/obro1961/config/ClothConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ protected ClothConfig(boolean timeEnabled, String timeString, Formatting[] timeF
* @return A new config Screen for player access
*/
public Screen getWMCHConfigScreen(Screen prevScreen) {
ConfigBuilder bldr = ConfigBuilder.create().setParentScreen(prevScreen).setDoesConfirmSave(true).setTitle(new TranslatableText("wmch.config.title"));
ConfigBuilder bldr = ConfigBuilder.create().setParentScreen(prevScreen).setDoesConfirmSave(true).setTitle(new TranslatableText("text.wmch.title"));
ConfigEntryBuilder iBldr = bldr.entryBuilder();
ConfigCategory time = bldr.getOrCreateCategory(new TranslatableText("wmch.config.time_category"));
ConfigCategory hover = bldr.getOrCreateCategory(new TranslatableText("wmch.config.hover_category"));
ConfigCategory boundary = bldr.getOrCreateCategory(new TranslatableText("wmch.config.boundary_category"));
ConfigCategory other = bldr.getOrCreateCategory(new TranslatableText("wmch.config.other_category"));
ConfigCategory time = bldr.getOrCreateCategory(new TranslatableText("text.wmch.time_category"));
ConfigCategory hover = bldr.getOrCreateCategory(new TranslatableText("text.wmch.hover_category"));
ConfigCategory boundary = bldr.getOrCreateCategory(new TranslatableText("text.wmch.boundary_category"));
ConfigCategory other = bldr.getOrCreateCategory(new TranslatableText("text.wmch.other_category"));

iBldr = quickStart("time", cfg.time, iBldr, time, null, current -> {
cfg.time = (boolean)WMCH.or(current, cfg.time_enabled, TIME);
Expand Down Expand Up @@ -84,9 +84,9 @@ public Screen getWMCHConfigScreen(Screen prevScreen) {
cfg.boundaryFormatting = (Formatting[])WMCH.or(bFmts.toArray(EMPTY), cfg.boundary_formatting, BOUNDARYFORMATTING);
});

other.addEntry( iBldr.startIntField(new TranslatableText("wmch.config.maxMsgs"), cfg.maxMsgs)
other.addEntry( iBldr.startIntField(new TranslatableText("text.wmch.maxMsgs"), cfg.maxMsgs)
.setDefaultValue(maxMsgs)
.setTooltip(new TranslatableText("wmch.config.maxMsgs_desc"))
.setTooltip(new TranslatableText("text.wmch.maxMsgs_desc"))
.setSaveConsumer(current -> { cfg.maxMsgs = current>100 && current<16835 ? current : cfg.maxMsgs>100 && cfg.maxMsgs<16835 ? cfg.maxMsgs : MAXMSGS; })
.build() );
quickStart("reset", cfg.reset, iBldr, other, null, current -> { if(current) reset(); cfg.reset = false; }, null);
Expand All @@ -99,7 +99,7 @@ public Screen getWMCHConfigScreen(Screen prevScreen) {
}

private static ConfigEntryBuilder quickStart(String key, Object def, ConfigEntryBuilder iBldr, ConfigCategory category, Consumer<String> saveStr, Consumer<Boolean> saveBool, Consumer<List<String>> saveList) {
TranslatableText[] texts = {new TranslatableText("wmch.config."+key), new TranslatableText("wmch.config."+key+"_desc")};
TranslatableText[] texts = {new TranslatableText("text.wmch."+key), new TranslatableText("text.wmch."+key+"_desc")};
switch (def.getClass().getName()) {
case "java.lang.String":
category.addEntry(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/obro1961/mixins/ChatHudMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Text addTimestamp(Text m) {
.withClickEvent( WMCH.config.hover ? new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, WMCH.config.getFormattedHover(now) ) : null )
)
)
.append(!isBoundary&&WMCH.config.time ? Text.of("") : new LiteralText(" ").setStyle(m.getStyle()))
.append(isBoundary||!WMCH.config.time ? Text.of("") : new LiteralText(" ").setStyle(m.getStyle()))
.append(m);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "wmch",
"version": "1.4.2",
"version": "1.4.3",

"name": "Where's My Chat History",
"description": "Currently:\n- Keeps chat history when you leave a server\n- increases the amount of maximum chat messages depending on allocated RAM\n- adds a timestamp before each message.\nTo access the config, either modify wmch.json in the config folder or install Mod Menu(v3.0.1+) and Cloth Config(6.1.48+) to edit the options in-game\nHeavily inspired by ryanbester and JackFred2's original mods.\n\nFor any technical users, this mod's only mixins are in the ChatHud.class and Keyboard.class; all problems most likely stemmed from conflict there.",
Expand Down

0 comments on commit 6188ffe

Please sign in to comment.