-
Notifications
You must be signed in to change notification settings - Fork 912
Depending on Create
This page describes how a mod developer can add a dependency on Create.
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 with 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.
If you are an add-on developer, you will need both a development environment dependency and a production environment dependency.
If you are not an add-on developer, you will only need a development environment dependency.
This type of dependency is added to the Gradle buildscript so that Gradle and your IDE can find Create's code.
Add the following code to your build.gradle
file. It defines the tterrag Maven, where Create, Flywheel, and Registrate jars are hosted.
repositories {
maven {
name = 'tterrag maven'
url = 'https://maven.tterrag.com/'
}
}
Add the following code to your build.gradle
file. It defines the Create, Flywheel, and Registrate dependencies.
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}")
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")
}
Add the following properties to your gradle.properties
file.
For 1.20.1
create_minecraft_version = 1.20.1
flywheel_minecraft_version = 1.20.1
create_version = 0.5.1.j-55
flywheel_version = 0.6.11-13
registrate_version = MC1.20-1.3.3
1.18 & 1.19
For 1.18.2
create_minecraft_version = 1.18.2
flywheel_minecraft_version = 1.18.2
create_version = 0.5.1.i-435
flywheel_version = 0.6.11-107
registrate_version = MC1.18.2-1.1.3
For 1.19.2
create_minecraft_version = 1.19.2
flywheel_minecraft_version = 1.19.2
create_version = 0.5.1.i-59
flywheel_version = 0.6.11-22
registrate_version = MC1.19-1.1.5
If you encounter errors when trying to start Minecraft from your development environment after adding a development environment dependency on Create, it is necessary to remap Create's mixin refmap. Add the following code to each Minecraft run configuration block.
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
The following code shows a client run configuration with mixin refmap remapping and with unrelated code omitted.
minecraft {
runs {
client {
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
}
}
}
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 integrations with them.
Follow the instructions on the JEI wiki here (1.18.2) or here (1.19.2/1.20.1).
The recommended JEI version for the current release is 9.7.0.209 (1.18.2), 11.2.0.254 (1.19.2), or 15.2.0.22 (1.20.1).
Follow the instructions provided in the README of the Curios repository.
The recommended Curios version for the current release is 5.0.7.0 (1.18.2), 5.1.4.1 (1.19.2), or 5.3.1 (1.20.1).
Follow the instructions provided in the README of the CC: Tweaked repository.
The recommended CC: Tweaked version for the current release is 1.100.10 (1.18.2), 1.101.2 (1.19.2), or 1.105.0 (1.20.1).
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.
Add the following dependency definition to your mods.toml
file, 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 explaining this to the user.
[[dependencies.modid]]
modId="create"
mandatory=true
versionRange="[0.5.1.i,)"
ordering="NONE"
side="BOTH"