User Tools

Site Tools


zh_cn:documentation:fabric_loom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zh_cn:documentation:fabric_loom [2023/04/17 04:49] – [常用任务] solidblockzh_cn:documentation:fabric_loom [2023/10/10 15:33] (current) – Sync rawdiamondmc
Line 22: Line 22:
 <code> <code>
 dependencies { dependencies {
- implementation project(path: ":name", configuration: "namedElements")+    implementation project(path: ":name", configuration: "namedElements") 
 +
 +</code> 
 + 
 +如果你在多项目构建中使用分离源集,你还需要为其他项目客户端源集添加依赖项。 
 + 
 +<code> 
 +dependencies { 
 +    clientImplementation project(":name").sourceSets.client.output
 } }
 </code> </code>
Line 31: Line 39:
  
 以下 build.gradle 文件片段展示了如何为您的模组启用此功能。由于您的模组现在将拆分为两个源集,因此您将需要使用新的 DSL 来定义您的模组源集。这将会让 Fabric Loader 将您的模组类路径组合在一起,对于其他一些复杂的多项目设置也有用。 以下 build.gradle 文件片段展示了如何为您的模组启用此功能。由于您的模组现在将拆分为两个源集,因此您将需要使用新的 DSL 来定义您的模组源集。这将会让 Fabric Loader 将您的模组类路径组合在一起,对于其他一些复杂的多项目设置也有用。
 +
 +要分享客户端与服务器的代码,需要 Minecraft 1.18(建议 1.19)、Loader 0.14 和 Loom 1.0 以上的版本。
 <code> <code>
 loom { loom {
zh_cn/documentation/fabric_loom.1681706968.txt.gz · Last modified: 2023/04/17 04:49 by solidblock