Repository navigation
Building from Source
Note
Current state: milestone M0 (scaffold). The project builds, loads into Minecraft and passes its bootstrap tests, but it has no gameplay yet: no blocks or items are registered. The jar is useful only for development. See Roadmap.
Prompt Critical is a Minecraft 1.21.1 mod for NeoForge, built with Gradle and ModDevGradle. This page covers building the jar, running a development client or server, the test tasks, and the CI pipeline.
| Tool | Version | Notes |
|---|---|---|
| JDK | 21 | All subprojects use a Java 21 toolchain. The foojay resolver plugin (org.gradle.toolchains.foojay-resolver-convention 1.0.0) can download one automatically if none is installed. |
| Gradle | 9.4.1 | Via the included wrapper (gradlew / gradlew.bat); no separate install needed |
| Git | any | |
| Internet access | — | First build downloads Minecraft, NeoForge, Create and CC: Tweaked artifacts |
Gradle settings from gradle.properties: -Xmx2G for the daemon, build cache on, parallel execution and configuration cache off.
git clone https://github.com/denfry/Prompt_Critical.git
cd Prompt_Critical
./gradlew buildOn Windows use gradlew.bat build (or .\gradlew build in PowerShell).
The mod jar lands in:
pc-mod/build/libs/promptcritical-<version>+1.21.1.jar
With the current mod_version=0.0.1 this is promptcritical-0.0.1+1.21.1.jar. The version string is <mod_version>+<minecraft> and is set for every subproject in the root build.gradle.kts. The jar contains the classes of pc-sim and pc-api directly (not jar-in-jar), so it is a single self-contained mod file.
Prompt_Critical/
├─ settings.gradle.kts # rootProject "prompt-critical"; include pc-sim, pc-api, pc-mod
├─ build.gradle.kts # shared: group, version, Java 21 toolchain, UTF-8
├─ gradle.properties # mod_id, mod_version, mod_group_id, ...
├─ gradle/libs.versions.toml # all dependency and plugin versions
├─ pc-sim/ # pure-Java simulation (no Minecraft), JUnit 5 / jqwik / ArchUnit, JMH plugin
├─ pc-api/ # addon API, depends on pc-sim
├─ pc-mod/ # NeoForge mod (ModDevGradle)
│ ├─ src/main/java # dev.denfry.promptcritical.mod
│ ├─ src/main/resources # assets/promptcritical (models, textures), data, META-INF/neoforge.mods.toml
│ ├─ src/generated/resources # datagen output (added to main resources)
│ └─ src/gametest/java # NeoForge GameTests
└─ art/ # Blockbench sources, previews, generator scripts (see Art-Pipeline)
See Architecture for why the simulation is a separate module.
From gradle.properties:
| Property | Value |
|---|---|
mod_id |
promptcritical |
mod_name |
Prompt Critical |
mod_version |
0.0.1 |
mod_group_id |
dev.denfry.promptcritical |
mod_authors |
denfry |
mod_license |
All Rights Reserved |
These are expanded into META-INF/neoforge.mods.toml during processResources, together with the NeoForge, Minecraft, Create and CC: Tweaked versions.
All versions live in gradle/libs.versions.toml:
| Dependency | Version | How it is used |
|---|---|---|
| Minecraft | 1.21.1 | — |
| NeoForge | 21.1.259 | Required, [21.1.259,)
|
ModDevGradle (net.neoforged.moddev) |
2.0.148 | Build plugin |
| Parchment mappings | 2024.11.17 | Parameter names |
| Create | 6.0.11 (6.0.11-319) |
Required at runtime, implementation (non-transitive) |
| Ponder | 1.0.87+mc1.21.1 |
implementation (bundled in Create's jar in production) |
| Flywheel | 1.0.6 | API compileOnly, implementation runtimeOnly
|
| Registrate | MC1.21-1.3.0+67 | implementation |
| CC: Tweaked | 1.120.2 |
Optional: common/core/forge APIs compileOnly; full mod runtimeOnly for dev runs |
| JUnit | 5.11.4 |
pc-sim tests |
| jqwik | 1.9.2 | Property-based tests |
| ArchUnit | 1.4.1 | Architecture rules |
| AssertJ | 3.27.3 | Assertions |
JMH Gradle plugin (me.champeau.jmh) |
0.7.3 | Benchmarks in pc-sim
|
Maven repositories used by pc-mod: maven.createmod.net (Create, Ponder, Flywheel), maven.ithundxr.dev/snapshots (Registrate), maven.squiddev.cc (CC: Tweaked, restricted to group cc.tweaked), plus Maven Central and the NeoForged Maven for plugins.
To play with a built jar you need, in the mods folder: NeoForge 21.1.259 or newer for Minecraft 1.21.1, Create 6.0.11 or newer, and optionally CC: Tweaked 1.120.2 or newer.
The run configurations in pc-mod/build.gradle.kts are named client, server, gameTestServer and data. ModDevGradle turns them into run<Name> tasks:
| Task | What it does |
|---|---|
./gradlew build |
Compiles all modules, runs pc-sim unit, property and architecture tests, builds the jar |
./gradlew :pc-sim:test |
Simulation tests only (JUnit Jupiter, jqwik and ArchUnit engines) |
./gradlew :pc-mod:runClient |
Development client. Uses the gametest source set, with GameTests for the promptcritical namespace enabled |
./gradlew :pc-mod:runServer |
Development dedicated server with --nogui
|
./gradlew :pc-mod:runGameTestServer |
Headless GameTest server; runs the GameTests and exits (non-zero on failure) |
./gradlew :pc-mod:runData |
Data generation: --mod promptcritical --all, output to pc-mod/src/generated/resources, with pc-mod/src/main/resources as existing resources |
./gradlew :pc-sim:jmh |
JMH benchmarks (plugin applied; no benchmarks yet) |
All runs log at INFO with the REGISTRIES marker enabled. Dev runs use the working directory pc-mod/run/ (ignored by git), which holds configs such as config/promptcritical-server.toml, logs and the test world.
In dev runs the mod is assembled from four source sets: pc-mod main, pc-mod gametest, pc-sim main and pc-api main. Changes in any of them are picked up without publishing anything.
-
PromptCritical(@Mod("promptcritical")): registers the server config and installs the addon API. -
ServerConfig:promptcritical-server.tomlwithtime.k_slow,storage.k_storage,nuclide.k_burn,nuclide.decay_heat_clock,energy.w_per_su,energy.j_per_fe,cc.token_rate,cc.token_burst,server.mode,damage.max_blocks_per_tick. -
SimClock/TimeDomaininpc-sim. -
PromptCriticalApi/ApiHolderinpc-api. - About 270 placeholder block models, 95 item models and their textures under
assets/promptcritical. They are not yet wired to registered blocks. - GameTests (
BootstrapGameTests, empty 3×3×3 templatedata/promptcritical/structure/gametest/empty_3x3x3.nbt):-
apiIsInstalled: API version matchesCURRENT_API_VERSION. -
serverConfigIsLoadedWithDefaults: config loaded,time.k_slow > 0,energy.w_per_su > 0. -
createIsLoaded: Create is present.
-
.github/workflows/build.yml runs on every push to main and on every pull request (ubuntu-latest):
actions/checkout@v4-
actions/setup-java@v4: Temurin 21 gradle/actions/setup-gradle@v4-
Build and unit tests:
./gradlew build --console=plain -
GameTest:
./gradlew :pc-mod:runGameTestServer --console=plain - Upload artifact
reports:**/build/reports/and**/build/test-results/(always, even on failure) - Upload artifact
promptcritical-jar:pc-mod/build/libs/*.jar
Every green CI run therefore produces a downloadable development jar in the run's artifacts. Dependabot (.github/dependabot.yml) checks GitHub Actions versions monthly.
The pull request template asks contributors to confirm:
-
./gradlew buildpasses; -
./gradlew :pc-mod:runGameTestServerpasses (for changes inpc-mod); - the wiki is updated if behaviour or names changed.
| Problem | What to check |
|---|---|
| "No compatible toolchain" | Install JDK 21 or let the foojay resolver download it (needs internet access) |
| Dependency resolution fails for Create / CC: Tweaked | The project's Maven repositories (createmod, ithundxr, squiddev) must be reachable |
runGameTestServer fails |
Reports are in pc-mod/build/reports/ and the log in pc-mod/run/logs/latest.log
|
| Datagen output missing |
runData writes to pc-mod/src/generated/resources, which is added to the main resources |
| Out of memory during build | Increase org.gradle.jvmargs in gradle.properties (default -Xmx2G) |
- Architecture — modules, dependency rules, planned simulation design
- Art-Pipeline — regenerating models and textures
- Getting-Started — installing and playing
- Roadmap — what comes after M0
Prompt Critical · © 2026 denfry · Repository · Report an issue
Start here
Design
Nuclear
Industries
Control and automation
World and server
Development