Skip to content

Commit

Permalink
build: Update to ModDevGradle, bump to 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Aug 12, 2024
1 parent 6ca8d21 commit 25458ad
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 80 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Fixed log spam when entities frequently pass through portals (e.g. minecart chunk loaders)
- Updated to Minecraft 1.21.1
6 changes: 2 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT' apply(false)
// id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false) // this causes ForgeGradle to fail in reobf
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" // this is required for VanillaGradle and NeoForge to exist in harmony
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply(false)
id 'fabric-loom' version '1.7-SNAPSHOT' apply(false)
id 'net.neoforged.moddev' version '0.1.110' apply(false)
id 'net.darkhax.curseforgegradle' version '1.1.18' apply(false)
id "com.modrinth.minotaur" version "2.+" apply(false)
}
Expand Down
13 changes: 13 additions & 0 deletions buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ repositories {
filter { includeGroupAndSubgroups("org.spongepowered") }
}
maven { url "https://maven.twelveiterations.com/repository/maven-public/" }
exclusiveContent {
forRepositories(
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org/'
},
maven {
name = "NeoForge"
url = 'https://maven.neoforged.net/releases'
}
)
filter { includeGroup('org.parchmentmc.data') }
}
}

dependencies {
Expand Down
17 changes: 11 additions & 6 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
plugins {
id 'multiloader-common'
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id 'net.neoforged.moddev'
}

base {
archivesName = "${mod_id}-common-${minecraft_version}"
}

minecraft {
version(minecraft_version)
def aw = file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWideners(aw)
neoForge {
neoFormVersion = neo_form_version
// Automatically enable AccessTransformers if the file exists
def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.add(at.absolutePath)
}
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}
}

Expand Down
5 changes: 4 additions & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ plugins {

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
mappings loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
}
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'multiloader-loader'
id 'net.minecraftforge.gradle' version '[6.0.25,6.2)'
id 'org.spongepowered.mixin'
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
id 'net.darkhax.curseforgegradle'
id "com.modrinth.minotaur"
}
Expand Down
19 changes: 11 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod_id=netherportalfix
mod_name=NetherPortalFix
mod_main=NetherPortalFix
description=Ensures correct destinations when travelling back and forth through Nether Portals in Multiplayer.
version = 21.0.2
version = 21.1.0
group=net.blay09.mods
homepage=https://mods.twelveiterations.com/mc/netherportalfix
sources=https://github.com/TwelveIterationMods/NetherPortalFix
Expand All @@ -18,28 +18,28 @@ modrinth_release_type=release
modrinth_project_id=nPZr02ET

# Minecraft
minecraft_version = 1.21
minecraft_versions = 1.21
minecraft_version = 1.21.1
minecraft_versions = 1.21,1.21.1
minecraft_version_range = [1.21,)
pack_format_number = 18
java_version = 21

# Balm
balm_version = 21.0.1-SNAPSHOT
balm_version = 21.0.14-SNAPSHOT
balm_version_range = [21.0.0,)

# Forge
forge_version = 51.0.0
forge_version = 52.0.2
forge_version_range = [51,)
forge_loader_version_range = [51,)

# NeoForge
neoforge_version = 21.0.0-beta
neoforge_version = 21.1.8
neoforge_version_range = [21-beta,)
neoforge_loader_version_range = [1,)

# Fabric
fabric_version = 0.100.1+1.21
fabric_version = 0.102.1+1.21.1
fabric_loader_version = 0.15.11

# Dependencies
Expand All @@ -51,4 +51,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mod_author = BlayTheNinth
credits = BlayTheNinth
kuma_version = [21.0,22)
kuma_version = [21.0,22)
neo_form_version = 1.21.1-20240808.144430
parchment_minecraft = 1.21
parchment_version = 2024.06.23
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
73 changes: 30 additions & 43 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'multiloader-loader'
id 'net.neoforged.gradle.userdev' version '7.0.142'
id 'net.neoforged.moddev'
id 'net.darkhax.curseforgegradle'
id "com.modrinth.minotaur"
}
Expand All @@ -9,60 +9,47 @@ base {
archivesName = "${mod_id}-neoforge-${minecraft_version}"
}

def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
minecraft.accessTransformers.file at
}

runs {
configureEach {
// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
systemProperty 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
systemProperty 'forge.logging.console.level', 'debug'

modSource project.sourceSets.main
neoForge {
version = neoforge_version
// Automatically enable neoforge AccessTransformers if the file exists
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.add(at.absolutePath)
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}

server {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
}
runs {
configureEach {
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
ideName = "NeoForge ${it.name.capitalize()} (${project.path})"
}

// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
client {
client()
}

server {
server()
}

data {
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
// workingDirectory project.file('run-data')
data {
data()
}
}

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}

sourceSets.main.resources { srcDir 'src/generated/resources' }

dependencies {
implementation "net.neoforged:neoforge:${neoforge_version}"
}

apply from: rootProject.file('repositories.gradle')
apply from: 'dependencies.gradle'

Expand Down
1 change: 1 addition & 0 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ repositories {
url = "https://jm.gserv.me/repository/maven-public/"
content {
includeGroup "info.journeymap"
includeGroup "mysticdrew"
}
}

Expand Down
18 changes: 3 additions & 15 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ pluginManagement {
exclusiveContent {
forRepository {
maven {
name = 'NeoForge'
url = uri("https://maven.neoforged.net/releases")
name = 'Sponge'
url = uri('https://repo.spongepowered.org/repository/maven-public')
}
}
filter {
includeGroupAndSubgroups("net.neoforged")
includeGroup("codechicken")
includeGroupAndSubgroups("org.spongepowered")
}
}
exclusiveContent {
Expand All @@ -37,17 +36,6 @@ pluginManagement {
includeGroupAndSubgroups("net.minecraftforge")
}
}
exclusiveContent {
forRepository {
maven {
name = 'Sponge Snapshots'
url = uri("https://repo.spongepowered.org/repository/maven-public")
}
}
filter {
includeGroupAndSubgroups("org.spongepowered")
}
}
}
}

Expand Down

0 comments on commit 25458ad

Please sign in to comment.