Skip to content

Commit 7902a33

Browse files
committed
docs: clean up mkdocs
1 parent f3ad782 commit 7902a33

3 files changed

Lines changed: 38 additions & 32 deletions

File tree

src/doc/docs/config/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Config GUI
22

3-
The config GUI is the main selling point of MoulConfig.
3+
The config GUI is the main selling point of MoulConfig. It can be manually constructed using a [`ConfigStructureReader` subclass](../javadocs/common/io.github.notenoughupdates.moulconfig.processor/-config-structure-reader/index.html),
4+
or by using [`ConfigProcessorDriver`](../javadocs/common/io.github.notenoughupdates.moulconfig.processor/-config-processor-driver/index.html) or the [`ManagedConfig` (for full automation of config saving and displaying)](../javadocs/common/io.github.notenoughupdates.moulconfig.managed/-managed-config/index.html)
45

56
## Structure
67

78
The config structure is roughly mapped to Java classes. Each category, subcategory and accordion is its own Java object.
89

9-
The base class needs to extend `Config` and each field needs to be non-static. This way your config is also easily
10+
The base class needs to extend [`Config`](../javadocs/common/io.github.notenoughupdates.moulconfig/-config/index.html) and each field needs to be non-static. This way your config is also easily
1011
serializable as a Json Object. MoulConfig is however completely agnostic towards your configs save format. The only
1112
requirement is that instances do not get reassigned. So updating the config object after you have processed a config
1213
requires that config to be reprocessed (and old MoulConfig to be discarded).
1314

15+
If you specifically do want MoulConfig to load and save files for you, consider obtaining the instance of your config
16+
through [`ManagedConfig`](../javadocs/common/io.github.notenoughupdates.moulconfig.managed/-managed-config/index.html)
17+
1418
### Top Level Structure
1519

1620
You can specify categories

src/doc/docs/index.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,25 @@ under an LGPL 3.0 license, and this version keeps that license.
1111
This version of MoulConfig is published to the [NEU Maven Repository][neurepo]. The latest
1212
version number can be [found there as well][versionlisting].
1313

14-
There are two versions of MoulConfig: `legacy` for 1.8.9 and `modern` for 1.20.2. Legacy has support for the config gui
15-
and for the gui library, while modern only supports the gui library.
14+
MoulConfig is split into two parts:
1615

17-
### Legacy installation
16+
- `common`, which contains logic for rendering, annotation processing, and most of the code you will interact with
17+
- `platform`, which contains code for coupling rendering and input with one specific platform
18+
- `modern-<version>`, which contains compatibility code for modern minecraft versions (1.20+)
19+
- `legacy`, which contains 1.8.9 compatibility code
1820

19-
On 1.8.9 Forge you will need to shadow MoulConfig like any other mod dependency. It is *highly* recommended that
20-
you relocate MoulConfig to another package, since our internals do not obey any backwards compatibility guarantees.
21-
In order to get resources loaded in your development environment is is recommended that you also make use of the
22-
`io.github.notenoughupdates.moulconfig.tweaker.DevelopmentResourceTweaker`. Do not specify this tweaker in your JAR manifest,
23-
*only* as a command line argument during development time. See a snippet on how to use MoulConfig with architectury loom
24-
below:
21+
### Modern installation
2522

26-
```kotlin
23+
Just shadow MoulConfig like any other mod. It is *highly* recommended that you relocate MoulConfig to another package,
24+
since our internals do not obey any backwards compatibility guarantees. No other buildscript configuration is necessary.
25+
26+
Each minecraft version has its own `modern-<minecraftVersion>` module. Those modules automatically contain the corresponding
27+
`common` code for the relevant MoulConfig version.
2728

29+
You will also need to copy the relevant `moulconfig.accesswidener` to your own. Check the relevant source directory for
30+
used accesswideners. In the future there might be a plugin to automatically shade / combine accesswideners.
31+
32+
```kt
2833
repositories {
2934
maven("https://maven.notenoughupdates.org/releases/")
3035
}
@@ -37,16 +42,7 @@ val shadowModImpl by configurations.creating {
3742

3843
dependencies {
3944
// Where shadowModImpl is a gradle configuration that remaps and shades the jar.
40-
"shadowModImpl"("org.notenoughupdates.moulconfig:legacy:<version>")
41-
}
42-
43-
// This snippet is required in order to correctly load resources in the development environment
44-
loom {
45-
launchConfigs {
46-
"client" {
47-
arg("--tweakClass", "io.github.notenoughupdates.moulconfig.tweaker.DevelopmentResourceTweaker")
48-
}
49-
}
45+
"shadowModImpl"("org.notenoughupdates.moulconfig:modern-<mcversion>:<version>")
5046
}
5147

5248
tasks.shadowJar {
@@ -56,25 +52,30 @@ tasks.shadowJar {
5652
}
5753
```
5854

59-
### Modern installation
55+
### Legacy installation
6056

61-
Just shadow MoulConfig like any other mod. It is *highly* recommended that you relocate MoulConfig to another package,
62-
since our internals do not obey any backwards compatibility guarantees. No other buildscript configuration is necessary.
57+
On 1.8.9 Forge you will need to shadow MoulConfig like any other mod dependency. It is *highly* recommended that
58+
you relocate MoulConfig to another package, since our internals do not obey any backwards compatibility guarantees.
59+
In order to get resources loaded in your development environment is is recommended that you also make use of the
60+
`io.github.notenoughupdates.moulconfig.tweaker.DevelopmentResourceTweaker`. Do not specify this tweaker in your JAR manifest,
61+
*only* as a command line argument during development time. See a snippet on how to use MoulConfig with architectury loom
62+
below:
63+
64+
```kotlin
6365

64-
```kt
6566
repositories {
6667
maven("https://maven.notenoughupdates.org/releases/")
6768
}
6869

69-
// Your gradle template probably already includes something like this configuration.
70+
// Your Gradle template probably already includes something like this configuration.
7071
// **Make sure that the configuration is extending modImplementation, otherwise you will run into name issues**
7172
val shadowModImpl by configurations.creating {
7273
configurations.modImplementation.get().extendsFrom(this)
7374
}
7475

7576
dependencies {
7677
// Where shadowModImpl is a gradle configuration that remaps and shades the jar.
77-
"shadowModImpl"("org.notenoughupdates.moulconfig:modern:<version>")
78+
"shadowModImpl"("org.notenoughupdates.moulconfig:legacy:<version>")
7879
}
7980

8081
tasks.shadowJar {
@@ -88,7 +89,7 @@ tasks.shadowJar {
8889
## Usage
8990

9091
See
91-
the [TestMod](https://github.com/NotEnoughUpdates/MoulConfig/blob/master/modern/src/main/kotlin/io/github/notenoughupdates/moulconfig/test)
92+
the [FabricMain](https://github.com/NotEnoughUpdates/MoulConfig/blob/v4/modern/templates/java/io/github/notenoughupdates/moulconfig/test/FabricMain.java)
9293
for usage examples, or check out the annotation
9394
package documentation to see the kind of config variable editors MoulConfig has built in.
9495

src/doc/mkdocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ site_url: https://notenoughupdates.org/MoulConfig
55

66
repo_name: MoulConfig
77
repo_url: https://github.com/NotEnoughUpdates/MoulConfig
8-
edit_uri: edit/master/src/doc/docs/
9-
copyright: 'Copyright &copy; 2023 Linnea Gräf'
8+
edit_uri: edit/v4/src/doc/docs/
9+
copyright: 'Copyright &copy; 2025 Linnea Gräf'
1010

1111
plugins:
1212
- zettelkasten
@@ -32,5 +32,6 @@ nav:
3232
- Javadocs:
3333
- Home: javadocs/index.html
3434
- Common: javadocs/common/index.html
35-
- Legacy: javadocs/legacy/index.html
35+
- Modern Platform: javadocs/modern/index.html
36+
- Legacy Platform: javadocs/legacy/index.html
3637
- Annotations: javadocs/common/io.github.notenoughupdates.moulconfig.annotations/index.html

0 commit comments

Comments
 (0)