Skip to content

Commit

Permalink
Update NeoForge
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Apr 22, 2024
1 parent 59be6ee commit 1cba0f5
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 23 deletions.
35 changes: 24 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.74'
id 'net.darkhax.curseforgegradle' version '1.1.17'
id 'net.neoforged.gradle.userdev' version '7.0.107'
id 'net.darkhax.curseforgegradle' version '1.1.18'
id 'com.modrinth.minotaur' version "2.+"
}

version = "${version}"
group = "${mod_group}"

base {
archivesName = "${mod_archive_name}-${mc_version}"
}
Expand All @@ -23,7 +21,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17)

runs {
// applies to all the run configs below
configureEach {
configureEach { net.neoforged.gradle.dsl.common.runs.run.Run run ->
// Recommended logging data for a userdev environment
systemProperty 'forge.logging.markers', 'REGISTRIES'

Expand All @@ -33,16 +31,20 @@ runs {
//Limit ram usage for the dev environment to 4GB
jvmArgument '-Xmx4G'

if (run.project.javaToolchains.launcherFor(java.toolchain).map { it.metadata.vendor }.getOrElse("").contains("JetBrains")) {
run.jvmArgument("-XX:+AllowEnhancedClassRedefinition")
}

modSource project.sourceSets.main
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'forge.enabledGameTestNamespaces', "${mod_id}"
systemProperty 'neoforge.enabledGameTestNamespaces', "${mod_id}"
}

server {
systemProperty 'forge.enabledGameTestNamespaces', "${mod_id}"
systemProperty 'neoforge.enabledGameTestNamespaces', "${mod_id}"
programArgument '--nogui'
}

Expand All @@ -67,10 +69,10 @@ repositories {
dependencies {
implementation "net.neoforged:neoforge:${neo_version}"

// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
//
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")
compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"

runtimeOnly "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
}

jar {
Expand Down Expand Up @@ -99,6 +101,9 @@ if (System.getenv().CURSEFORGE_KEY) {

mainFile.changelog = file("$project.rootDir/changelog.md")
mainFile.changelogType = 'markdown'

// mainFile.addRequirement()
// mainFile.addOptional()
}
}

Expand All @@ -118,4 +123,12 @@ if (System.getenv().MODRINTH_KEY) {

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
11 changes: 7 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ org.gradle.daemon=false

# Base info
mc_version=1.20.4
neo_version=20.4.69-beta
neogradle.subsystems.parchment.minecraftVersion=1.20.2
neogradle.subsystems.parchment.mappingsVersion=2023.12.10
neo_version=20.4.232
neogradle.subsystems.parchment.minecraftVersion=1.20.4
neogradle.subsystems.parchment.mappingsVersion=2024.02.25
mod_group=com.nopoisonregen.main
mod_id=nopoisonregen
mod_archive_name=NMPR
Expand All @@ -18,4 +18,7 @@ curseforge_id=317853
modrinth_id=6UbQDdoj

# Version
version=2.1.0
version=2.1.0

# Dependencies
jei_version=17.3.0.49
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 6 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
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"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -144,15 +141,15 @@ 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
# 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
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# 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"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pluginManagement {
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ This mod makes it so that the potion effects poison and regenration cancel each
[[dependencies.nopoisonregen]]
modId="minecraft"
mandatory=true
versionRange="[1.20.2,1.21)"
versionRange="[1.20.4,1.21)"
ordering="NONE"
side="BOTH"

0 comments on commit 1cba0f5

Please sign in to comment.