Skip to content

Commit

Permalink
Refactored code for 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusBordihn committed Dec 24, 2024
1 parent 746a772 commit ffad9f2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 273 deletions.
123 changes: 0 additions & 123 deletions Fabric/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions Fabric/src/main/resources/fabric.mod.json

This file was deleted.

16 changes: 5 additions & 11 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ archivesBaseName = "${mod_id}-forge-${minecraft_version}"
minecraft {
mappings channel: 'official', version: minecraft_version

reobf = false
copyIdeResources = true

runs {
client {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
modClientRun {
source sourceSets.main
Expand All @@ -31,10 +31,7 @@ minecraft {

server {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Server'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
modServerRun {
source sourceSets.main
Expand All @@ -45,11 +42,8 @@ minecraft {

data {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
taskName 'Data'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
modDataRun {
source sourceSets.main
Expand Down Expand Up @@ -80,6 +74,8 @@ configurations {

dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

// Include Common code
compileOnly project(":Common")

// Extra libraries
Expand Down Expand Up @@ -133,8 +129,6 @@ reobf {
shadowJar {}
}

jar.finalizedBy('reobfJar')

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down
2 changes: 1 addition & 1 deletion NeoForge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.116'
id 'net.neoforged.gradle.userdev' version '7.0.145'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'nu.studer.credentials' version '3.0'
id "com.modrinth.minotaur" version "2.+"
Expand Down
17 changes: 16 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'idea'
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.8"
}

Expand All @@ -21,6 +22,13 @@ subprojects {
}

dependencies {
// Cross compile
configurations.configureEach {
resolutionStrategy.force 'com.github.oshi:oshi-core:6.4.10'
resolutionStrategy.force 'org.ow2.asm:asm-analysis:9.7'
resolutionStrategy.force 'org.ow2.asm:asm-util:9.7'
}

// Additional Java Libraries
compileOnly 'com.google.code.gson:gson:2.10.1'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
Expand All @@ -33,7 +41,7 @@ subprojects {
}

tasks.register('wrapper', Wrapper) {
gradleVersion = '8.8'
gradleVersion = '8.10'
}

tasks.withType(JavaCompile).configureEach {
Expand All @@ -53,4 +61,11 @@ subprojects {
}

tasks.register("prepareKotlinBuildScriptModel") {}

idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
}
9 changes: 3 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ version=2.1.0
group=de.markusbordihn.modsoptimizer
vendor_name=markusbordihn
# Common
minecraft_version=1.21.1
minecraft_version=1.21.3
# Forge
forge_version=52.0.3
# Fabric
fabric_version=0.102.1+1.21.1
fabric_loader_version=0.15.11
forge_version=53.0.25
# NeoForge
neoforge_version=21.1.12
neoforge_version=21.3.58
# Mod
mod_id=mods_optimizer
mod_name=Mods Optimizer
Expand Down
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.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ pluginManagement {
}
}

rootProject.name = 'Mods Optimizer'
rootProject.name = 'Mods Optimizer 1.21.3'
include("Common", "Forge", "NeoForge")

0 comments on commit ffad9f2

Please sign in to comment.