Skip to content

Commit

Permalink
Added an example [no-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed May 19, 2024
1 parent 719d1b4 commit cf27c39
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf27c39

Please sign in to comment.