-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff227e9
commit bd45a24
Showing
131 changed files
with
1,856 additions
and
462 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
plugins { | ||
id("java") | ||
id("idea") | ||
id("com.matthewprenger.cursegradle") version "1.4.0" | ||
id("net.minecraftforge.gradle") version "[6.0,6.2)" | ||
id("org.parchmentmc.librarian.forgegradle") version "1.+" | ||
id("org.spongepowered.mixin") version "0.7.+" | ||
} | ||
|
||
val minecraftVersion: String = "1.20.1" | ||
// Don't bump this unless completely necessary - this is the NeoForge + Forge compatible version | ||
// In future we probably want to track NeoForge versions, especially post-1.20 breaking change window | ||
val forgeVersion: String = "47.1.3" | ||
val mixinVersion: String = "0.8.5" | ||
val modVersion: String = System.getenv("VERSION") ?: "0.0.0-indev" | ||
val jeiVersion: String = "15.2.0.21" | ||
val patchouliVersion: String = "1.20.1-81-FORGE" | ||
val jadeVersion: String = "4614153" | ||
val topVersion: String = "4629624" | ||
val tfcVersion: String = "5425324" | ||
|
||
val modId: String = "dttfc" | ||
|
||
base { | ||
archivesName.set("DynamicTreesTFC-$minecraftVersion") | ||
group = "org.labellum.mc" | ||
version = modVersion | ||
} | ||
|
||
java { | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
} | ||
|
||
idea { | ||
module { | ||
excludeDirs.add(file("run")) | ||
} | ||
} | ||
|
||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
maven(url = "https://dvs1.progwml6.com/files/maven/") // JEI | ||
maven(url = "https://modmaven.k-4u.nl") // Mirror for JEI | ||
maven(url = "https://maven.blamejared.com") // Patchouli | ||
maven(url = "https://www.cursemaven.com") { | ||
content { | ||
includeGroup("curse.maven") | ||
} | ||
} | ||
flatDir { | ||
dirs("libs") | ||
} | ||
} | ||
|
||
dependencies { | ||
minecraft("net.minecraftforge", "forge", version = "$minecraftVersion-$forgeVersion") | ||
// TFC | ||
implementation(fg.deobf("curse.maven:tfc-302973:${tfcVersion}")) | ||
// implementation(fg.deobf("tfc:TerraFirmaCraft-Forge-1.20.1:0.0.0-indev")) | ||
|
||
implementation(fg.deobf("curse.maven:dt-252818:5439532")) | ||
implementation(fg.deobf("curse.maven:dtplus-478155:5393548")) | ||
|
||
// JEI | ||
compileOnly(fg.deobf("mezz.jei:jei-$minecraftVersion-forge-api:$jeiVersion")) | ||
compileOnly(fg.deobf("mezz.jei:jei-$minecraftVersion-common-api:$jeiVersion")) | ||
runtimeOnly(fg.deobf("mezz.jei:jei-$minecraftVersion-forge:$jeiVersion")) | ||
|
||
// Patchouli | ||
// We need to compile against the full JAR, not just the API, because we do some egregious hacks. | ||
compileOnly(fg.deobf("vazkii.patchouli:Patchouli:$patchouliVersion")) | ||
runtimeOnly(fg.deobf("vazkii.patchouli:Patchouli:$patchouliVersion")) | ||
|
||
// Jade / The One Probe | ||
compileOnly(fg.deobf("curse.maven:jade-324717:${jadeVersion}")) | ||
compileOnly(fg.deobf("curse.maven:top-245211:${topVersion}")) | ||
|
||
// Only use Jade at runtime | ||
runtimeOnly(fg.deobf("curse.maven:jade-324717:${jadeVersion}")) | ||
|
||
if (System.getProperty("idea.sync.active") != "true") { | ||
annotationProcessor("org.spongepowered:mixin:${mixinVersion}:processor") | ||
} | ||
|
||
} | ||
|
||
minecraft { | ||
mappings("parchment", "2023.09.03-1.20.1") | ||
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg")) | ||
|
||
runs { | ||
all { | ||
args("-mixin.config=$modId.mixins.json") | ||
|
||
property("forge.logging.console.level", "debug") | ||
|
||
property("mixin.env.remapRefMap", "true") | ||
property("mixin.env.refMapRemappingFile", "$projectDir/build/createSrgToMcp/output.srg") | ||
|
||
jvmArgs("-ea", "-Xmx4G", "-Xms4G") | ||
|
||
jvmArg("-XX:+AllowEnhancedClassRedefinition") | ||
|
||
mods.create(modId) { | ||
source(sourceSets.main.get()) | ||
} | ||
} | ||
|
||
register("client") { | ||
workingDirectory(project.file("run/client")) | ||
} | ||
|
||
register("server") { | ||
workingDirectory(project.file("run/server")) | ||
|
||
arg("--nogui") | ||
} | ||
|
||
} | ||
} | ||
|
||
mixin { | ||
add(sourceSets.main.get(), "dttfc.refmap.json") | ||
} | ||
|
||
tasks { | ||
jar { | ||
manifest { | ||
attributes["Implementation-Version"] = project.version | ||
attributes["MixinConfigs"] = "$modId.mixins.json" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. | ||
# This is required to provide enough memory for the Minecraft decompilation process. | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.jvmargs=-Xmx4G | ||
org.gradle.daemon=false | ||
|
||
# Version metadata | ||
forge_version=40.1.73 | ||
minecraft_version=1.18.2 | ||
mixin_version=0.8.5 | ||
jei_version=9.7.1.232 | ||
patchouli_version=1.18.2-70 | ||
tfc_identifier=4552678 | ||
dt_version=1.0.2 | ||
dtp_version=1.0.0 | ||
org.gradle.console=plain |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.