Skip to content

如何使用 FG3,或继续使用 FG2 #108

Answered by ZekerZhayard
friendlyhj asked this question in Q&A
Discussion options

You must be logged in to vote

今天 @3TUSK 正好和我探讨到了关于如何继续使用 FG2 的问题:
解决方案其实很简单,以 FG 2.3 为例,只需要在 build.gradle 内作以下修改即可:

buildscript {
    repositories {
        mavenCentral()
        maven { url = "https://maven.minecraftforge.net/" }  // 将此处的地址改为新的地址
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}

apply plugin: 'net.minecraftforge.gradle.forge'

// 修改 FG 内默认添加的 Forge Maven 地址为新地址
repositories.each {
    if (it instanceof MavenArtifactRepository && it.url.toString() == "https://files.minecraftforge.net/maven") {
        it.url = "https://maven.minecraftforge.net/"
    }
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by friendlyhj
Comment options

You must be logged in to vote
1 reply
@ZekerZhayard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants