- Run
./gradlew setupDecompWorkspace clean buildcommand. - The built jars are all in
${rootprojectDir}/build/libsfolder.
NOTICE: The jar file with specific Minecraft version is for the vanilla edition without Forge and Fabric. The json files are launcher profiles which only work when building with our CI server.
For now, CustomSkinLoader is unable to run under self development environment, so it needs to add to another development environment as a library.
There are the available versions in different environments below:
| Forge | Fabric | |
|---|---|---|
| Runtime Environment | forge-1.8-11.14.0.1237 ~ 1.13.2-25.0.22 forge-1.13.2-25.0.42 ~ latest |
fabric-loader-0.4.3+build.134 ~ latest Minecraft 18w43b ~ latest fabric-api is not required |
| Development Environment | ForgeGradle-2.1-SNAPSHOT ~ latest forge-1.8-11.14.3.1503 ~ 1.12.2-14.23.5.2860 forge-1.13.2-25.0.198 ~ latest |
fabric-loom-(?) ~ latest fabric-loader-0.12.0 ~ latest Minecraft 18w49a ~ latest fabric-api is not required |
- Create a new empty minecraft development environment.
- Add below contents to
build.gradle:repositories { maven { url = "file:/${projectDir}/local-repo" } }
- Create these folders in the new project directory, then copy the built jar and source jar into it:
Forge 1.8 ~ 1.16.5: ./local-repo/mods/CustomSkinLoader_ForgeLegacy/${version} Forge 1.17.1 ~ latest: ./local-repo/mods/CustomSkinLoader_ForgeActive/${version} Fabric: ./local-repo/mods/CustomSkinLoader_Fabric/${version}${version}should be repalced with something like15.0-SNAPSHOT-00manually - Create a pom file in the same folder:
- Forge 1.8 ~ 1.16.5:
CustomSkinLoader_ForgeLegacy-${version}.pom
<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>mods</groupId> <artifactId>CustomSkinLoader_ForgeLegacy</artifactId> <!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually --> <version>${version}</version> </project>
- Forge 1.17.1 ~ latest:
CustomSkinLoader_ForgeActive-${version}.pom
<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>mods</groupId> <artifactId>CustomSkinLoader_ForgeActive</artifactId> <!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually --> <version>${version}</version> </project>
- Fabric:
CustomSkinLoader_Fabric-${version}.pom
<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>mods</groupId> <artifactId>CustomSkinLoader_Fabric</artifactId> <!-- `${version}` should be repalced with something like `15.0-SNAPSHOT-00` manually --> <version>${version}</version> </project>
- Forge 1.8 ~ 1.16.5:
- Add below contents to
build.gradle:dependencies { deobfCompile "mods:CustomSkinLoader_ForgeLegacy:15.0-SNAPSHOT-00" } minecraft { clientRunArgs += ["--tweakClass", "customskinloader.forge.ForgeDevTweaker", "--username", "<Your username>"] }
- Run
./gradlew setupDecompWorkspacecommand. - Then you can debug the mod in IDE or through
./gradlew runClientcommand.
- Add below contents to
build.gradle:dependencies { implementation fg.deobf("mods:CustomSkinLoader_ForgeLegacy:15.0-SNAPSHOT-00") // Only required for MinecraftForge 1.8 ~ 1.16.5 implementation fg.deobf("mods:CustomSkinLoader_ForgeActive:15.0-SNAPSHOT-00") // Only required for MinecraftForge 1.17.1 ~ latest } minecraft { runs { client { args += ["--username", "<Your username>"] args += ["--tweakClass", "customskinloader.forge.ForgeDevTweaker"] // Only required for MinecraftForge 1.12.2 } } }
- Setup the development environment and run the game as usual.
- Add below contents to
build.gradle:dependencies { modImplementation "mods:CustomSkinLoader_Fabric:15.0-SNAPSHOT-00" } tasks.runClient { args += ["--username", "<Your username>"] }
- Add
--username <Your username>to CLI arguments inRun/Debug Configurationsdialog. - Run the game in IDE or through
./gradlew runClientcommand..
- Check the latest version in https://littlesk.in/csl-latest .
- Add below contents to
build.gradle:// Before Gradle 5.x repositories { ivy { url = "https://csl.littleservice.cn/" layout "pattern", { artifact "[organisation]/[artifact]-[revision](-[classifier])(.[ext])" } } } // After Gradle 6.x repositories { ivy { url = "https://csl.littleservice.cn/" metadataSources { artifact() } patternLayout { artifact "[organisation]/[artifact]-[revision](-[classifier])(.[ext])" } } }
- Follow the same steps in Running and Testing.
- CustomSkinLoader is based on forge-1.12.2-14.23.5.2768 currently, including Fabric edition. We use custom reobfuscation mappings such as Fabric.tsrg and mixin.tsrg to generate different editions jar and Mixin reference jsons.
- The source codes are all in
${projectDir}/sourcesand resource files are in${projectDir}/resourcesinstead ofsrc/main/javaandsrc/main/resources. - Do not add other required mods.