Skip to content

Commit

Permalink
feat: Update to Minecraft 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Oct 22, 2024
1 parent 87bd5e6 commit e1e5376
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 58 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT' apply(false)
id 'net.neoforged.moddev' version '0.1.110' apply(false)
id 'net.neoforged.moddev' version '1.0.21' apply(false)
id 'net.darkhax.curseforgegradle' version '1.1.18' apply(false)
id "com.modrinth.minotaur" version "2.+" apply(false)
}
Expand Down
15 changes: 14 additions & 1 deletion buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,25 @@ repositories {
}
}
filter { includeGroupAndSubgroups("org.spongepowered") }
exclusiveContent {
forRepositories(
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org/'
},
maven {
name = "NeoForge"
url = 'https://maven.neoforged.net/releases'
}
)
filter { includeGroup('org.parchmentmc.data') }
}
}
maven { url "https://maven.twelveiterations.com/repository/maven-public/" }
}

dependencies {
compileOnly 'org.jetbrains:annotations:24.1.0'
implementation 'org.jetbrains:annotations:24.1.0'
}

// Declare capabilities on the outgoing configurations.
Expand Down
17 changes: 15 additions & 2 deletions kuma-api/fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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 Expand Up @@ -36,5 +39,15 @@ loom {
ideConfigGenerated(true)
runDir("runs/server")
}
data {
inherit client
setConfigName("fabric Data API")
ideConfigGenerated(true)
runDir("build/datagen")

vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${project(":kuma-api:common").file("src/generated/resources")}"
vmArg "-Dfabric-api.datagen.modid=${mod_id}"
}
}
}
}
21 changes: 11 additions & 10 deletions kuma-api/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,32 @@ issues=https://github.com/TwelveIterationMods/Kuma/issues
license = MIT

# Minecraft
minecraft_version = 1.21.2-pre1
minimum_minecraft_version = 1.21
minecraft_version = 1.21.2
minimum_minecraft_version = 1.21.2
minecraft_versions = 1.21,1.21.1,1.21.2
minecraft_version_range = [1.21,)
pack_format_number = 18
minecraft_version_range = [1.21.2,)
pack_format_number = 57
java_version = 21

# NeoForm and Parchment
neo_form_version=1.21.2-pre1-20241008.174159
neo_form_version=1.21.2-20241022.151510
parchment_minecraft=1.21
parchment_version=2024.06.23
parchment_version=2024.07.28

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

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

# Fabric
fabric_version = 0.105.3+1.21.2
fabric_loader_version = 0.16.5
fabric_version = 0.106.1+1.21.2
fabric_loader_version = 0.16.7

# Dependencies
mixin_version = 0.8.5
Expand Down
70 changes: 42 additions & 28 deletions kuma-api/neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,63 @@
plugins {
id 'multiloader-loader'
id 'net.neoforged.gradle.userdev' version '7.0.142'
id 'net.neoforged.moddev'
}

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

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

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
parchment {
minecraftVersion = parchment_minecraft
mappingsVersion = parchment_version
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
runs {
configureEach {
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
ideName = "NeoForge ${it.name.capitalize()} (${project.path})"
}

client {
client()
}

server {
server()
}

data {
data()
}
}

server {
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArgument '--nogui'
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}

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

dependencies {
implementation "net.neoforged:neoforge:${neoforge_version}"
repositories {
if (neoforge_snapshot_url) {
maven {
url = neoforge_snapshot_url
content {
includeModule('net.neoforged', 'testframework')
includeModule('net.neoforged', 'neoforge')
}
}
}
}

apply from: rootProject.file('repositories.gradle')
Expand Down
20 changes: 4 additions & 16 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 All @@ -58,7 +46,7 @@ plugins {
include("kuma-api:common")
include("kuma-api:fabric")
//include("kuma-api:forge")
//include("kuma-api:neoforge")
include("kuma-api:neoforge")
// include("kuma:common")
// include("kuma:fabric")
// include("kuma:forge")
Expand Down

0 comments on commit e1e5376

Please sign in to comment.