Skip to content

Commit

Permalink
1.20.1 update
Browse files Browse the repository at this point in the history
  • Loading branch information
eerussianguy committed Jul 5, 2024
1 parent ff227e9 commit bd45a24
Show file tree
Hide file tree
Showing 131 changed files with 1,856 additions and 462 deletions.
152 changes: 0 additions & 152 deletions build.gradle

This file was deleted.

135 changes: 135 additions & 0 deletions build.gradle.kts
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"
}
}
}
13 changes: 2 additions & 11 deletions gradle.properties
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 modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
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
28 changes: 19 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand All @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
Loading

0 comments on commit bd45a24

Please sign in to comment.