Skip to content

Commit d5f8e7e

Browse files
committed
feat: add logo and readme
1 parent 4572be8 commit d5f8e7e

File tree

9 files changed

+75
-7
lines changed

9 files changed

+75
-7
lines changed

MODPACK_GUIDE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Modpack Developer Guide
2+
3+
Setup is straightforward:
4+
1. Add Config Manager to your modpack (from [Modrinth] or [CurseForge]).
5+
2. Copy all configuration files into a folder called `modpack_default` inside `config/`.
6+
3. The structure inside `modpack_default` should mirror the root of the Minecraft directory.
7+
8+
**Example:**
9+
10+
.minecraft/
11+
├─ options.txt (the "real" one)
12+
├─ config/
13+
│ ├─ myMod.json (the modpack one)
14+
│ ├─ modpack_default/
15+
│ │ ├─ options.txt (the modpack one)
16+
│ │ └─ config/
17+
│ │ └─ myMod.json (the "real" one)
18+
19+
---
20+
21+
## FAQ
22+
23+
**Q: Can I forcefully override user preferences for a specific file?**
24+
**A:** Yes. Place the file directly in its normal location instead of only inside `modpack_default`.
25+
26+
---
27+
28+
**Q: Can I force an update or reset of user configs?**
29+
**A:** You can do this by placing a file named `CONFIG_MANAGER_UPDATE_FLAG` or `CONFIG_MANAGER_RESET_FLAG` in the `config` directory.
30+
**Not recommended.**
31+
32+
---
33+
34+
**Q: Can I use this for other content than config files (e.g., .jar files)?**
35+
**A:** Technically yes, there are no restrictions.
36+
**Not recommended** as this mod is not designed for that, and it may confuse users.

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Config Manager
2+
3+
**Config Manager** is a Minecraft mod that allows modpack developers to ship configuration files in a simple and user-friendly way.
4+
It supports both **NeoForge** and **Fabric**, starting from **Minecraft 1.20.1** and newer.
5+
6+
---
7+
8+
## Features
9+
10+
### Ship modpack defaults without overriding user preferences
11+
- Place your modpack’s default configuration files in `/config/modpack_default`.
12+
- At startup, all files from that directory are copied into the Minecraft directory **only if they do not already exist**.
13+
14+
**Examples:**
15+
- `.minecraft/config/modpack_default/options.txt` → copied to `.minecraft/options.txt`
16+
- `.minecraft/config/modpack_default/config/myMod.json` → copied to `.minecraft/config/myMod.json`
17+
18+
This ensures that user settings are preserved across modpack updates.
19+
20+
---
21+
22+
### Update or reset to the modpack’s defaults
23+
From the mod list (NeoForge) or Mod Menu (Fabric), you can open the Config Manager GUI and choose between two actions:
24+
25+
1. **Update** – Copies (overwriting) the modpack’s config files on top of the user’s.
26+
- All settings changed by the pack are updated.
27+
- Untouched settings remain as configured by the user.
28+
29+
2. **Reset** – Wipes the entire `config` directory and replaces it with the files shipped by the modpack.
30+
- Useful to fix broken or corrupted installations.
31+
32+
---
33+

common/src/main/java/io/github/thebossmagnus/mods/config_manager/common_coremod/CopyConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public final class CopyConfig {
1111

12-
private static final String dirName = "modpacks_defaults";
12+
private static final String dirName = "modpack_defaults";
1313

1414
public static void init(Path gameDir) {
1515

common/src/main/java/io/github/thebossmagnus/mods/config_manager/common_coremod/OverwriteConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.stream.Stream;
1010

1111
/**
12-
* Copies config files from modpacks_defaults, overwriting any existing files in the config directory.
12+
* Copies config files from modpack_defaults, overwriting any existing files in the config directory.
1313
*/
1414
public final class OverwriteConfig {
1515
private static final String DIR_NAME = "modpack_defaults";

common/src/main/java/io/github/thebossmagnus/mods/config_manager/common_coremod/ResetAndCopyConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010

1111
/**
12-
* Deletes all config files except the modpacks_defaults directory, then copies configs from modpacks_defaults.
12+
* Deletes all config files except the modpack_defaults directory, then copies configs from modpack_defaults.
1313
*/
1414
public final class ResetAndCopyConfig {
1515
private static final String DIR_NAME = "modpack_defaults";
1616

1717
/**
18-
* Deletes all files and folders in config except modpacks_defaults, then copies files from modpacks_defaults.
18+
* Deletes all files and folders in config except modpack_defaults, then copies files from modpacks_defaults.
1919
*/
2020
public static void run(Path gameDir, Logger logger) {
2121
Path configDir = gameDir.resolve("config");

fabric/src/main/java/io/github/thebossmagnus/mods/config_manager/fabric/ConfigManagerLanguageAdapter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
import io.github.thebossmagnus.mods.config_manager.common_coremod.ConfigManagerStartup;
5-
import io.github.thebossmagnus.mods.config_manager.common_coremod.CopyConfig;
65
import net.fabricmc.loader.api.FabricLoader;
76
import net.fabricmc.loader.api.LanguageAdapter;
87
import net.fabricmc.loader.api.LanguageAdapterException;

fabric/src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"${mod_author}"
99
],
1010
"license": "${license}",
11-
"icon": "${mod_id}.png",
11+
"icon": "icon.png",
1212
"environment": "*",
1313
"entrypoints": {
1414
"main": [

fabric/src/main/resources/icon.png

53.3 KB
Loading

neoforge/src/main/resources/META-INF/neoforge.mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version = "${version}" #mandatory
77
displayName = "${mod_name}" #mandatory
88
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional (see https://docs.neoforged.net/docs/misc/updatechecker/)
99
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional (displayed in the mod UI)
10-
logoFile = "${mod_id}.png" #optional
10+
logoFile = "icon.png" #optional
1111
credits = "${credits}" #optional
1212
authors = "${mod_author}" #optional
1313
description = '''${description}''' #mandatory (Supports multiline text)

0 commit comments

Comments
 (0)