Created Depending on Create (markdown)

PepperCode1 2022-08-20 16:50:39 -07:00
parent c17922b8cb
commit 3c2952f5b0

110
Depending-on-Create.md Normal file

@ -0,0 +1,110 @@
# Depending on Create
### Create version: **0.5.0.d**
### Minecraft version: **1.18.2**
The information on this page describes how a developer can add a dependency on Create.
## Preliminary Information
Release jars of Create and Flywheel...
- are built and published manually.
- are published to CurseForge and Modrinth.
- are published when the developers feel that enough features have been added since the previous release.
- do not have a build number.
Non-release jars of Create and Flywheel...
- are built and published automatically by the CI.
- are published to the Maven.
- are published every time there is a new commit.
- do have a build number.
Even though release jars do not have a build number, they were still built from a commit, which also has a corresponding non-release jar. This is to say that each release jar is associated to a unique, near identical non-release jar on the Maven.
It is not advisable to depend on a non-release jar that does not have a corresponding release jar as it may contain code that does not exist in a release jar. Your mod may not work in production if it uses such code since users will be using a release jar as opposed to the non-release jar you depended on during development.
The intended way to access Create jars to depend on them is through the Maven.
For ease of use, this page will always contain the build numbers that exactly correspond to the release jar of the version at the top of the page.
## Quick Access
**If you are an add-on developer**, you will need both a [development environment dependency](#development-environment-dependency) and a [production environment dependency](#production-environment-dependency).
**If you are not an add-on developer**, you will only need a [development environment dependency](#development-environment-dependency).
## Types of Dependencies
### Development Environment Dependency
This type of dependency is added to the Gradle buildscript so that Gradle and your IDE can find Create's code.
#### Configuration
Add the following code to the `repositories` block of your `build.gradle`. It defines the tterrag Maven, where Create, Flywheel, and Registrate jars are hosted.
```groovy
repositories {
maven {
name = 'tterrag maven'
url = 'https://maven.tterrag.com/'
}
}
```
Add the following code to the `dependencies` block of your `build.gradle`. It defines the Create, Flywheel, and Registrate dependencies.
```groovy
dependencies {
implementation fg.deobf("com.simibubi.create:create-${create_minecraft_version}:${create_version}:slim") { transitive = false }
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}")
compileOnly fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")
}
```
Add the following properties to your `gradle.properties`.
```properties
create_minecraft_version = 1.18.2
flywheel_minecraft_version = 1.18.2
create_version = 0.5.0.d-168
flywheel_version = 0.6.5-91
registrate_version = MC1.18.2-1.1.3
```
---
### Optional Development Environment Dependencies
If you have added a development environment dependency on Create, developing your mod may be easier if these optional dependencies are also included since Create has optional integrations with them.
#### JEI
Follow the instructions on the [JEI wiki](https://github.com/mezz/JustEnoughItems/wiki/Getting-Started-%5B1.13-to-1.18.2%5D).
The recommended JEI version for the current release is **9.7.0.209**.
#### Curios
Follow the instructions provided in the [README of the Curios repository](https://github.com/TheIllusiveC4/Curios#adding-to-your-project).
The recommended Curios version for the current release is **5.0.7.0**.
---
### Production Environment Dependency
This type of dependency is added to the `mods.toml` file so that Forge knows your mod will not work without a certain version of Create. This type of dependency is only useful if a development environment dependency was also added. This type of dependency should not be added if your mod is able to work in a production environment without Create.
#### Configuration
Add the following lines to your `mods.toml`, replacing `modid` with your mod's ID. This tells Forge that your mod depends on Create. If Create is not present, or is outdated, Forge will display an error screen saying just that.
```toml
[[dependencies.modid]]
modId="create"
mandatory=true
versionRange="[0.5.0.d,)"
ordering="NONE"
side="BOTH"
```