This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
api:migration:neoforge [2023/11/17 04:32] – Add yarn block and more shedaniel | api:migration:neoforge [2024/05/11 12:37] (current) – clarify file paths in forge-like section juuz | ||
---|---|---|---|
Line 3: | Line 3: | ||
__We assume the migration is not easy, please feel free to step by the Discord server for assistance.__ | __We assume the migration is not easy, please feel free to step by the Discord server for assistance.__ | ||
+ | |||
+ | == Acknowledgments == | ||
+ | The bulk of the work on porting Architectury Loom is done by [[https:// | ||
==== About MinecraftForge ==== | ==== About MinecraftForge ==== | ||
- | To read more about our support on MinecraftForge and NeoForge, you may read more on the [[api: | + | To learn more about our support on MinecraftForge and NeoForge, you may read on the [[api: |
==== About Yarn ==== | ==== About Yarn ==== | ||
Line 12: | Line 15: | ||
Architectury Loom had always supported Yarn as a mappings option for Forge, and will continue to do so for NeoForge. NeoForge has removed srg mappings as intermediary, | Architectury Loom had always supported Yarn as a mappings option for Forge, and will continue to do so for NeoForge. NeoForge has removed srg mappings as intermediary, | ||
- | Architectury Loom 1.4 adds " | + | Architectury Loom 1.4 adds " |
- Write ATs in Mojang Mappings | - Write ATs in Mojang Mappings | ||
Line 76: | Line 79: | ||
- Add a Forge-like subproject, and a NeoForge subproject | - Add a Forge-like subproject, and a NeoForge subproject | ||
- | ===== Migrate your Forge subproject to NeoForge | + | ==== Migrate your Forge subproject to NeoForge ==== |
**1. Update to latest Gradle & Architectury Loom 1.4** | **1. Update to latest Gradle & Architectury Loom 1.4** | ||
Line 186: | Line 189: | ||
**10. Refresh Gradle & Run Configs, Fix Errors & forge/ | **10. Refresh Gradle & Run Configs, Fix Errors & forge/ | ||
- | ===== Add a NeoForge subproject independent of the Forge subproject | + | ==== Add a NeoForge subproject independent of the Forge subproject ==== |
**1. Initial Setup** | **1. Initial Setup** | ||
- | Create a '' | + | Create a '' |
Then in '' | Then in '' | ||
Line 198: | Line 201: | ||
Follow the steps above in " | Follow the steps above in " | ||
- | ===== Add a Forge-like subproject, and a NeoForge subproject ===== | + | Also remember, in your '' |
- | WIP | + | |
+ | <code groovy> | ||
+ | architectury { | ||
+ | common(" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Add a Forge-like subproject, and a NeoForge subproject ==== | ||
+ | |||
+ | **1. Initial Setup** | ||
+ | |||
+ | * Create a '' | ||
+ | * Copy your '' | ||
+ | * Copy your '' | ||
+ | * Copy your '' | ||
+ | * In '' | ||
+ | * In '' | ||
+ | |||
+ | **2. Setup NeoForge** | ||
+ | |||
+ | Follow the steps above in " | ||
+ | |||
+ | Make sure you do the " | ||
+ | |||
+ | <code groovy> | ||
+ | architectury { | ||
+ | common(" | ||
+ | it.platformPackage " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | **3. Setup Forge-Like** | ||
+ | |||
+ | In '' | ||
+ | <code groovy> | ||
+ | architectury { | ||
+ | forgeLike([" | ||
+ | it.platformPackage " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Then, remove the dependency on Fabric Loader, and add the dependency on MinecraftForge, | ||
+ | |||
+ | <code groovy> | ||
+ | dependencies { | ||
+ | forge " | ||
+ | compileOnly(project(path: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **4. Setup Forge** | ||
+ | |||
+ | In '' | ||
+ | |||
+ | <code groovy> | ||
+ | dependencies { | ||
+ | forge " | ||
+ | |||
+ | common(project(path: | ||
+ | common(project(path: | ||
+ | shadowCommon(project(path: | ||
+ | shadowCommon(project(path: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **5. Setup NeoForge** | ||
+ | |||
+ | First, we need to add the forgeLike configuration, | ||
+ | |||
+ | <code groovy> | ||
+ | configurations { | ||
+ | common | ||
+ | forgeLike | ||
+ | shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. | ||
+ | compileClasspath.extendsFrom common, forgeLike | ||
+ | runtimeClasspath.extendsFrom common, forgeLike | ||
+ | developmentNeoForge.extendsFrom common | ||
+ | developmentForgeLike.extendsFrom forgeLike | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Then, similar to above, we will add the dependency on Forge-Like' | ||
+ | |||
+ | <code groovy> | ||
+ | dependencies { | ||
+ | neoforge " | ||
+ | |||
+ | common(project(path: | ||
+ | forgeLike(project(path: | ||
+ | shadowCommon(project(path: | ||
+ | shadowCommon(project(path: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **6. Setup NeoForge remaps** | ||
+ | |||
+ | Since there are class renames in NeoForge, we will want to remap them. Architectury Plugin automatically added remaps to NeoForge' | ||
+ | |||
+ | Here's an example on remapping '' | ||
+ | |||
+ | <code groovy> | ||
+ | // In forgelike/ | ||
+ | architectury { | ||
+ | forgeLike([" | ||
+ | it.platformPackage " | ||
+ | it.remapForgeLike " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // In neoforge/ | ||
+ | architectury { | ||
+ | neoForge { | ||
+ | platformPackage | ||
+ | remapForgeLike " | ||
+ | } | ||
+ | } | ||
+ | </ |