How neoforgemdks/mdk-26.1.2-moddevgradle works
1. This repository is a NeoForge Minecraft mod template, not a finished feature mod. Its architecture is mostly the standard mod bootstrap shape: build tooling, mod metadata, a common mod entrypoint, a client-only entrypoint, and resource files.
2. The build layer is Gradle-based. build.gradle, settings.gradle, gradle.properties, and the Gradle wrapper define how the mod is compiled, packaged, and run in a local development environment. The .github/workflows/build.yml file indicates CI automation for building the mod artifact.
3. The runtime boundary is the NeoForge mod loader plus the Minecraft client/server runtime. src/main/templates/META-INF/neoforge.mods.toml is the mod descriptor template that NeoForge uses to discover the mod, declare its ID, and wire lifecycle metadata.
4. The main Java package is com.example.examplemod, which is the mod namespace. ExampleMod.java is the primary mod entrypoint for shared logic that runs in the mod lifecycle. In a diagram, this is the central node that the loader invokes first.
5. ExampleModClient.java is the client-side entrypoint. It represents the client-only boundary where rendering, input, or other client-specific registration would live. This separation matters because it prevents client code from loading on dedicated servers.
6. Config.java is the configuration subsystem. Even though the template likely has minimal implementation, it marks where mod settings and tunables are defined and loaded. Architecturally, this is the state/config boundary between user-editable values and mod logic.
7. Resources are split by concern under src/main/resources. The assets/examplemod/lang/en_us.json file is the localization layer, providing human-readable text for the mod’s UI/messages. This is the first concrete content pipeline from code identifiers to user-facing strings.
8. src/main/templates is a packaging-time templating area rather than runtime content. The presence of the META-INF/neoforge.mods.toml template suggests the build process assembles final metadata during distribution, which is important for how the mod is identified and loaded.
9. The repository’s structure shows a clear separation between code and data: Java sources implement lifecycle hooks and configuration, while resources provide metadata and localization. There is no visible gameplay feature subsystem yet, which means the repo is primarily an architectural starting point.
10. The external dependencies and ecosystem are material to the architecture: Java, Gradle, and NeoForge define compilation, loading, and mod lifecycle behavior. The README also points to NeoForged documentation and Mojang mapping names, which affect how source code is written and understood.
11. For an architecture diagram, the main flow is: Gradle builds the mod, NeoForge reads the mod metadata, the mod loader invokes ExampleMod on startup, client-specific setup is delegated to ExampleModClient, and resources such as language files are consumed by Minecraft at runtime.
12. Overall, this is a minimal mod scaffold with three important boundaries: loader/build-time metadata, shared mod logic, and client-only logic. Everything else in the repo supports those boundaries rather than introducing separate business subsystems.
Main entry points: build.gradle Gradle build · ExampleMod.java ExampleMod · build.yml CI workflow · README.md README
Components 15
Build & CI
Gradle-based build, wrapper, and CI automation.
- Gradle build · Defines compilation, packaging, and run tasks.
build.gradle - Settings · Names and includes the Gradle project.
settings.gradle - Properties · Shared Gradle and mod development settings.
gradle.properties - Wrapper · Pinned Gradle distribution used for builds.
gradle/wrapper/gradle-wrapper.properties - CI workflow · Builds the mod artifact in GitHub Actions.
.github/workflows/build.yml - README · Explains the template, dependencies, and usage.
README.md
Mod Runtime
NeoForge loader boundary and Java entrypoints.
- NeoForge · Loads the mod and drives lifecycle events.
- Minecraft runtime · Client/server environment hosting the mod.
- ExampleMod · Primary shared mod lifecycle entrypoint.
src/main/java/com/example/examplemod/ExampleMod.java - Client entry · Client-only registration and setup boundary.
src/main/java/com/example/examplemod/ExampleModClient.java - Config · Defines and loads mod tunables and settings.
src/main/java/com/example/examplemod/Config.java
Resources
Packaged metadata and localization resources.
- Mod metadata · Template metadata used for mod discovery and packaging.
src/main/templates/META-INF/neoforge.mods.toml - Assets · Packaged game assets under the mod namespace.
src/main/resources/assets/examplemod - Language · Human-readable strings for UI and messages.
src/main/resources/assets/examplemod/lang/en_us.json - Mod namespace · Shared resource identifier used by code and assets.
Connections 18
- Settings → Gradle build: configures · Project settings feed the build definition.
- Properties → Gradle build: tunes · Shared properties control Gradle and mod parameters.
- Wrapper → Gradle build: pins · Wrapper selects the Gradle version used locally and in CI.
- CI workflow → Wrapper: uses · CI relies on the wrapper to build consistently.
- CI workflow → Gradle build: runs · Workflow executes the project build.
- Gradle build → Mod metadata: packages · Build assembles the mod metadata template into the artifact.
- Gradle build → Assets: packages · Build includes game assets in the mod jar.
- NeoForge → Mod metadata: discovers · NeoForge reads metadata to identify the mod.
- Minecraft runtime → NeoForge: hosts · Minecraft provides the runtime environment for the loader.
- NeoForge → ExampleMod: invokes · Loader calls the shared mod entrypoint during lifecycle startup.
- NeoForge → Client entry: invokes · Loader initializes the client entrypoint on the client side.
- ExampleMod → Config: reads · Shared mod logic consumes configuration state.
- Client entry → Config: reads · Client-specific setup may also use configuration.
- Assets → Mod namespace: namespaces · Asset files live under the mod namespace.
- Language → Mod namespace: belongs to · Localization file is part of the mod's asset namespace.
- ExampleMod → Mod namespace: uses · Java package and identifiers align with the mod namespace.
- README → Gradle build: documents · README explains the build and development workflow.
- README → NeoForge: documents · README describes the NeoForge runtime and loader conventions.