Low-Drag-MC / Shimmer

A mod that integrates my passion for rendering
MIT License
70 stars 22 forks source link

Wiki 上的一些问题 #39

Closed FurryRbl closed 1 year ago

FurryRbl commented 1 year ago

wiki 上给出直接添加 Shimmer 为依赖方法不正确。

repositories{ //add our maven first
    maven {
        url "https://maven.firstdarkdev.xyz/snapshots"
    }
 }

// Forge
implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${minecraft_version}:${shimmer_version}")
// Fabric
modImplementation "com.lowdragmc.shimmer:Shimmer-fabric:${minecraft_version}:${shimmer_version}"

//for architectury user, you can also just import shimmer's common jar in you common module
modImplementation "com.lowdragmc.shimmer:Shimmer-common:${minecraft_version}:${shimmer_version}"

上面内容应该修改为

repositories{ //add our maven first
    maven {
        url "https://maven.firstdarkdev.xyz/snapshots"
    }
 }

// Forge
implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${minecraft_version}-${shimmer_version}")
// Fabric
modImplementation "com.lowdragmc.shimmer:Shimmer-fabric:${minecraft_version}-${shimmer_version}"

//for architectury user, you can also just import shimmer's common jar in you common module
modImplementation "com.lowdragmc.shimmer:Shimmer-common:${minecraft_version}-${shimmer_version}"

其中改变的是 ${minecraft_version}:${shimmer_version} 里面的":"为"-",否则Gradle 无法下载到文件。

并且Shimmer 的 Module 还依赖ModMenu、Cloth Config、Sodium和Mixin Extras

需要添加以下存储库

repositories {
    maven {
        url "https://maven.shedaniel.me/"
    }
    maven {
         url 'https://jitpack.io'
    }
    maven {
        url "https://cursemaven.com"
        content {
            includeGroup "curse.maven"
        }
    }
}

对于ModMenu和Sodium 添加 https://maven.terraformersmc.com/releases/https://api.modrinth.com/maven 没有任何效果

因为其使用了Curse Maven的includeGroup。

Yefancy commented 1 year ago

感谢指正

zomb-676 commented 1 year ago

对于Forge应该是正常的,但是对于Fbaric,根据我这边的测试,它会读取pom中的依赖尝试获取

根据我在的discord找到的一张图片 https://discord.com/channels/792699517631594506/1020312385631813643/1020314702305304716 对于ModMenu,可以换用modRuntimeOnly解决 但是对于Sodium,shimmer在编译时和运行时都需要这个依赖 但是即使使用了图中下方的右侧Configuration,即modImplementation,它仍然会被写入pom作为依赖 之后也许可以自建一个Configuration 在正常任务中为modImplementation,而在upload任务中,转为modCompileOnly来避免将依赖直接写入pom文件 在能解决之前,我会把这个issue一直ping着

我们尝试过在upload任务中,将产生的.pom文件的dependencies全部删去 但是在同时产生的.module文件中,仍然存在着依赖描述

MarbleGateKeeper commented 1 year ago

没必要加那么多存储库地址,直接

    implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${shimmer_minecraft_version}-${shimmer_version}") { transitive = false }

不就行了