Skip to content

Commit

Permalink
Move tutorials to wiki
Browse files Browse the repository at this point in the history
They where taking up a lot of space in the readme
  • Loading branch information
Grayray75 committed Aug 12, 2023
1 parent 5869316 commit 0fd1194
Showing 1 changed file with 4 additions and 112 deletions.
116 changes: 4 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
- [Introduction to the folder structure](#introduction-to-the-folder-structure)
- [Creating your mod](#creating-your-mod)
- [Useful gradle commands](#useful-gradle-commands)
- [More info](#more-info)
- [Useful gradle plugins](#useful-gradle-plugins)
- [Automated Modrinth publication](#automated-modrinth-publication)
- [Adding mod dependencies](#adding-mod-dependencies)
- [Improved source decompilation](#improved-source-decompilation)
- [More info](#more-info)
- [License](#license)


## Quick start guide

### Introduction to the folder structure
Expand Down Expand Up @@ -63,117 +58,14 @@ If you know what you are doing you can also safely remove the api from the build
./gradlew --stop
```

### More info
## More info

Additional tutorials and tips can be found in the [wiki](https://github.com/Legacy-Fabric/fabric-example-mod/wiki).

For more detailed setup instructions please see the [fabric wiki](https://fabricmc.net/wiki/tutorial:setup).

If you are new to fabric or Minecraft modding in general then [this wiki page](https://fabricmc.net/wiki/tutorial:primer) may help you.


## Useful gradle plugins

### Automated Modrinth publication

The [minotaur](https://github.com/modrinth/minotaur) gradle plugin is a tool for deploying build artifacts to Modrinth.

For more info see https://github.com/modrinth/minotaur#readme

<details>
<summary>Usage example</summary>

```groovy
// build.gradle
plugins {
id "com.modrinth.minotaur" version "2.+"
}
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "my-mod"
versionNumber = "${project.mod_version}"
versionName = "my-mod v${project.mod_version}"
versionType = "release"
uploadFile = remapJar
gameVersions = ["1.8.9"]
loaders = ["fabric"]
dependencies {
required.project "legacy-fabric-api"
}
}
```

To publish to Modrinth run:
```sh
./gradlew build modrinth
```

</details>

### Adding mod dependencies

In order to implement the api of a mod, for example to add your mod settings to [Mod Menu](https://modrinth.com/mod/legacy-mod-menu), it is required that you add that mod to your build script as a dependency with `modImplementation`. To simplify this setup Modrinth allows you to load mods directly from there maven.

More info about this can be found in the [Modrinth docs](https://docs.modrinth.com/docs/tutorials/maven/). \
For more info about loom dependencies see the [fabric wiki](https://fabricmc.net/wiki/documentation:fabric_loom?s[]=dependencies#options).

<details>
<summary>Usage example</summary>

```groovy
// build.gradle
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:legacy-mod-menu:1.1.0"
}
```

</details>

### Improved source decompilation

By default the `genSources` task uses the fabric [cfr](https://github.com/FabricMC/cfr) decompiler to generate Minecraft sources.
Vineflower is a decompiler which contains many enhancements and generally produces much better source code. \
With the [loom-vineflower](https://github.com/Juuxel/loom-vineflower) plugin it is possible to integrate it directly into your project.

For more info see https://github.com/Juuxel/loom-vineflower#readme

<details>
<summary>Usage example</summary>

```groovy
// build.gradle
plugins {
id 'io.github.juuxel.loom-vineflower' version "1.11.0"
}
```

Instead of `genSources`, you can now run:
```sh
./gradlew genSourcesWithVineflower
```

</details>


## License

This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

0 comments on commit 0fd1194

Please sign in to comment.