|
1 | | -# CleanroomModTemplate |
2 | | -Mod development template for Cleanroom, uses Unimined |
3 | | - |
4 | | -## Usage |
5 | | -### Choose Branch |
6 | | -Choose mixin branch if you want to use Mixin. |
7 | | - |
8 | | -Use scala and kotlin branch if you want to write in non-Java language. |
9 | | - |
10 | | -There are 4 branches available: |
11 | | -- main |
12 | | -- mixin |
13 | | -- scala |
14 | | -- kotlin |
15 | | - |
16 | | -If you want to use non-main branches, after clicked *Create a new repository* under *Use this template*, check the *Include all branches* checkbox. |
17 | | - |
18 | | -### gradle.properties |
19 | | -Edit gradle.properties and set your modid, mod version, mod name, package, etc. |
20 | | - |
21 | | -If you are writing a coremod, remember to set related settings to true. |
22 | | - |
23 | | -### Reference Class |
24 | | -Mostly used to store mod version so you can fill it to `@Mod`. |
25 | | - |
26 | | -You should change its location to fit your new package name. |
27 | | - |
28 | | -You can find it under `src/main/java-templates`. |
29 | | - |
30 | | -### Dependencies |
31 | | -You can find dependency script in `gradle/scripts/dependencies.gradle`. |
32 | | - |
33 | | -No more `rfg.deobf()` or `fg.deobf` for mods, you should use `modImplementation`, `modCompileOnly` and `modRuntimeOnly`. |
34 | | - |
35 | | -### Shadow |
36 | | -You can use `shadow` in dependency declaration to shadow libraries. |
37 | | - |
38 | | -### Contain |
39 | | -You can use `contain` in dependency declaration to add non-mod libraries to artifact jar. |
40 | | - |
41 | | -They will be extracted and loaded automatically in production. |
42 | | - |
43 | | -### Mixin |
44 | | -MixinBooter API is deprecated in Cleanroom. |
45 | | - |
46 | | -Current approach is to set json configs in `MixinConfigs` manifest key, which will be read by Cleanroom. |
47 | | - |
48 | | -You don't need to set tons of json too. If you aren't mixining into Forge, all you need is two jsons for `DEFAULT` hase and `MOD` Phase. |
49 | | - |
50 | | -All you need is to put `IEarlyMixinLoader` mixin to `DEFAULT` json, and, mixins from `ILateMixinLoader` to `MOD` json. |
51 | | - |
52 | | -As for calling `Loader.isModLoaded()`, just fit an `IMixinConfigPlugin` to your json and call in `shouldApply()` |
53 | | - |
54 | | -There are some example mixins and a HEI dependency in mixin fork, remove them before writing yours. |
55 | | - |
56 | | -### Access Transformer |
57 | | -You MUST write AT file in MCP name. It will be remapped back to SRG name in artifact jar. |
58 | | - |
59 | | -Rename AT file name to your modid before using it. There's an example entry in AT file, remove it if you want to use AT. |
60 | | - |
61 | | -**WARNING**: ATs from dependency won't be applied to vanilla source. |
62 | | - |
63 | | -### Source Code with Comments |
64 | | -Run `genSources` task in gradle. |
65 | | - |
66 | | -If you want to `find usage` from vanilla like RFG, just change the scope in IntelliJ settings. |
67 | | - |
68 | | -### Running Client or Server |
69 | | -You **MUST** add mods by using `modImplementation` or `modRuntimeOnly`, or mapping and ATs will break. |
70 | | - |
71 | | -If you are using IntelliJ, **DO NOT** use the `Minecraft Client` configure with a blue icon. Just use the `runClient` Gradle task. |
72 | | - |
73 | | -### GitHub Action |
74 | | -This template comes with three workflows. |
75 | | - |
76 | | -`build.yml` will build and upload artifact for every commit. Useful when you want to provide test builds for debugging. |
77 | | - |
78 | | -`release.yml` will make a GitHub release if you pushed a git tag. |
79 | | - |
80 | | -`release-to-cf-mr.yml` can publish your mod to CurseForge and/or Modrinth. |
81 | | - |
82 | | -You need to fill in your project IDs and configure your tokens in GitHub repository first. |
83 | | - |
84 | | -By default, you will need to manually trigger the workflow in web page, but you can also enable tag triggering by merging it into `release.yml`. |
85 | | - |
86 | | -### Credit |
87 | | -Thanks @Karnatour for fixing shadow plugin |
88 | | -Thanks @ghostflyby for making kotlin branch |
| 1 | +<h1 align="center">Advanced Backups Patch</h1> |
| 2 | +<h1 align="center"> |
| 3 | + <a href="https://www.curseforge.com/minecraft/mc-mods/advanced-backups"><img src="https://img.shields.io/badge/Available%20for-MC%201.12.2%20-informational?style=for-the-badge" alt="Supported Versions"></a> |
| 4 | + <a href="https://github.com/GTModpackTeam/AdvancedBackups-Patch/blob/main/LICENSE"><img src="https://img.shields.io/github/license/GTModpackTeam/AdvancedBackups-Patch?style=for-the-badge" alt="License"></a> |
| 5 | + <a href="https://discord.gg/xBwHpZyZdW"><img src="https://img.shields.io/discord/945647524855812176?color=5464ec&label=Discord&style=for-the-badge" alt="Discord"></a> |
| 6 | + <br> |
| 7 | + <a href="https://www.curseforge.com/minecraft/mc-mods/advanced-backups-patch"><img src="https://cf.way2muchnoise.eu/ZZZZZZ.svg?badge_style=for_the_badge" alt="CurseForge"></a> |
| 8 | + <a href="https://modrinth.com/mod/advanced-backups-patch"><img src="https://img.shields.io/modrinth/dt/ZZZZZ?logo=modrinth&label=&suffix=%20&style=for-the-badge&color=2d2d2d&labelColor=5ca424&logoColor=1c1c1c" alt="Modrinth"></a> |
| 9 | + <a href="https://github.com/GTModpackTeam/AdvancedBackups-Patch/releases"><img src="https://img.shields.io/github/downloads/GTModpackTeam/AdvancedBackups-Patch/total?sort=semver&logo=github&label=&style=for-the-badge&color=2d2d2d&labelColor=545454&logoColor=FFFFFF" alt="GitHub"></a> |
| 10 | +</h1> |
| 11 | + |
| 12 | +## Features |
| 13 | +- This mod is a compatibility patch that fixes the [Advanced Backups](https://www.curseforge.com/minecraft/mc-mods/advanced-backups) mod for Minecraft 1.12.2. |
| 14 | + |
| 15 | +## Required mod |
| 16 | +- [MixinBooter](https://github.com/CleanroomMC/MixinBooter) |
| 17 | + |
| 18 | +## License |
| 19 | +- Advanced Backups Patch |
| 20 | + - Copyright (c) 2026 tier940 |
| 21 | + - [](https://github.com/GTModpackTeam/AdvancedBackups-Patch/blob/main/LICENSE) |
| 22 | +- [CleanroomModTemplate](https://github.com/CleanroomMC/CleanroomModTemplate) |
| 23 | + - Copyright (c) 2025 kappa-maintainer |
| 24 | + - [](https://github.com/CleanroomMC/CleanroomModTemplate/blob/main/LICENSE) |
| 25 | + |
| 26 | +## Credits |
| 27 | +- Thanks to HeatherWhite for [Advanced Backups](https://www.curseforge.com/minecraft/mc-mods/advanced-backups) |
0 commit comments