diff --git a/README.md b/README.md index 473339a..f947d27 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,32 @@ the NeoForge APIs. This is the primary use of the NeoForm Runtime. For a given NeoForge or NeoForm version, it will build an execution graph and allows the caller to retrieve various resulting artifacts from it. +Examples + +``` +# Produce NeoForge jars for 1.20.6 + +> nfrt run --dist joined --neoforge net.neoforged:neoforge:20.6.72-beta:userdev +No results requested. Available results: [compiled, clientResources, sources, serverResources] + +> nfrt run --neoforge net.neoforged:neoforge:20.6.72-beta:userdev \ + --dist joined \ + --write-result=compiled:minecraft.jar \ + --write-result=clientResources:client-extra.jar \ + --write-result=sources:minecraft-sources.jar + +This produces the NeoForge userdev artifacts in build/ + +> nfrt run --neoform net.neoforged:neoform:1.20.6-20240429.153634@zip \ + --dist joined \ + --write-result=compiled:minecraft.jar \ + --write-result=clientResources:client-extra.jar \ + --write-result=sources:minecraft-sources.jar + +This produces the Vanilla artifacts in build/ + +``` + | Option | Description | |-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `--dist` [required] | Which distribution type to generate artifacts for. NeoForm defines these and usually `client`, `server` and `joined` are available. | diff --git a/build.gradle b/build.gradle index d20db66..0332c00 100644 --- a/build.gradle +++ b/build.gradle @@ -126,6 +126,18 @@ idea { project { settings { runConfigurations { + "Run Neoforge 1.20.6 (joined)"(Application) { + // Create new run configuration "MyApp" that will run class foo.App + mainClass = mainClassName + programParameters = "run --dist joined --neoforge net.neoforged:neoforge:20.6.72-beta:userdev --write-result=compiled:build/minecraft.jar --write-result=clientResources:build/client-extra.jar --write-result=sources:build/minecraft-sources.jar" + moduleRef(project, sourceSets.main) + } + "Run Neoform 1.20.6 (joined)"(Application) { + // Create new run configuration "MyApp" that will run class foo.App + mainClass = mainClassName + programParameters = "run --dist joined --neoforge net.neoforged:neoform:1.20.6-20240429.153634@zip --write-result=compiled:build/minecraft.jar --write-result=clientResources:build/client-extra.jar --write-result=sources:build/minecraft-sources.jar" + moduleRef(project, sourceSets.main) + } "Run clean-cache"(Application) { // Create new run configuration "MyApp" that will run class foo.App mainClass = mainClassName