forked from FiniteReality/embeddium
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from embeddedt/12.x/forge
Some work
- Loading branch information
Showing
69 changed files
with
524 additions
and
541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,145 +1,58 @@ | ||
plugins { | ||
id "java-library" | ||
id "com.gtnewhorizons.retrofuturagradle" version "1.3.26" | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
maven { url = 'https://maven.minecraftforge.net' } | ||
maven { url = 'https://repo.spongepowered.org/repository/maven-public' } | ||
maven { url = 'https://maven.outlands.top/releases' } | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
dependencies { | ||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.10.+', changing: true | ||
classpath "cl.franciscosolis:blossom:1.3.1" | ||
classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT" | ||
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod | ||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64 | ||
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL) | ||
} | ||
} | ||
apply plugin: 'net.minecraftforge.gradle' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'java' | ||
apply plugin: 'cl.franciscosolis.blossom-extended' | ||
apply plugin: 'org.spongepowered.mixin' | ||
|
||
version = "${minecraft_version}-${mod_version}" | ||
group = mod_base_package | ||
archivesBaseName = mod_id | ||
|
||
|
||
|
||
java.toolchain.languageVersion = JavaLanguageVersion.of(21) | ||
|
||
minecraft { | ||
mappings channel: mappings_channel, version: mappings_version | ||
|
||
accessTransformer = file('src/main/resources/META-INF/sodium_at.cfg') | ||
|
||
legacy { | ||
fixClasspath = true | ||
extractMappings = true | ||
attachMappings = true | ||
} | ||
|
||
runs { | ||
client { | ||
workingDirectory project.file('run/client') | ||
|
||
property 'forge.logging.markers', 'REGISTRIES' | ||
property 'forge.logging.console.level', 'debug' | ||
|
||
} | ||
mcVersion.set(minecraft_version) | ||
username.set("Developer") | ||
|
||
server { | ||
workingDirectory project.file('run/server') | ||
injectedTags.put("MOD_VERSION", mod_version) | ||
injectedTags.put("MOD_NAME", "Sodium-Vintage") | ||
} | ||
|
||
property 'forge.logging.markers', 'REGISTRIES' | ||
property 'forge.logging.console.level', 'debug' | ||
tasks.injectTags.outputClassName.set("${mod_base_package}.Tags") | ||
|
||
mods { | ||
"${mod_id}" { | ||
source sourceSets.main | ||
} | ||
} | ||
} | ||
} | ||
} | ||
tasks.deobfuscateMergedJarToSrg.configure {accessTransformerFiles.from("src/main/resources/META-INF/sodium_at.cfg")} | ||
|
||
sourceSets.main.resources { srcDir 'src/generated/resources' } | ||
mixin {add sourceSets.main, mod_id + ".mixins.refmap.json"} | ||
repositories { | ||
maven { | ||
name 'Cleanroom Maven' | ||
url 'https://maven.cleanroommc.com/' | ||
} | ||
maven { | ||
url "https://repo.cleanroommc.com/snapshots" | ||
} | ||
maven { | ||
url "https://maven.outlands.top/releases/" | ||
} | ||
|
||
mavenCentral() | ||
maven { url "https://maven.cleanroommc.com" } | ||
} | ||
|
||
dependencies { | ||
minecraft "com.cleanroommc:cleanroom:15.24.0.3023" | ||
|
||
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2' | ||
annotationProcessor 'com.google.guava:guava:33.0.0-jre' | ||
annotationProcessor 'com.google.code.gson:gson:2.10.1' | ||
annotationProcessor "org.ow2.asm:asm-debug-all:5.2" | ||
annotationProcessor "com.google.guava:guava:32.1.2-jre" | ||
annotationProcessor "com.google.code.gson:gson:2.8.9" | ||
|
||
annotationProcessor ('com.cleanroommc:sponge-mixin:0.15.3+mixin.0.8.5') | ||
|
||
} | ||
processResources { | ||
blossom { | ||
String mcmod = "src/main/resources/mcmod.info" | ||
String mcmeta = "src/main/resources/pack.mcmeta" | ||
replaceToken("mod_id", mod_id, mcmod) | ||
replaceToken("mod_name", mod_name, mcmod) | ||
replaceToken("mod_description", mod_description, mcmod) | ||
replaceToken("mod_version", mod_version, mcmod) | ||
replaceToken("mod_authors", mod_authors, mcmod) | ||
replaceToken("minecraft_version", minecraft_version, mcmod) | ||
replaceToken("mod_id", mod_id, mcmeta) | ||
def mixinBooter = modUtils.enableMixins("zone.rong:mixinbooter:8.9", "sodium.mixins.refmap.json") | ||
api (mixinBooter) { | ||
transitive = false | ||
} | ||
annotationProcessor (mixinBooter) { | ||
transitive = false | ||
} | ||
} | ||
|
||
blossom { | ||
String reference = "src/main/java/com/cleanroommc/Reference.java" | ||
replaceToken("@VERSION@", mod_version, reference) | ||
replaceToken("@MODNAME@", mod_name, reference) | ||
replaceToken("@MODID@", mod_id, reference) | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes([ | ||
'Specification-Title': mod_id, | ||
'Specification-Vendor': mod_authors, | ||
'Specification-Version': '1', // We are version 1 of ourselves | ||
'FMLCorePluginContainsFMLMod': true, | ||
'FMLCorePlugin': 'me.jellysquid.mods.sodium.client.SodiumMixinTweaker', | ||
'ForceLoadAsMod': true, | ||
'FMLAT': 'sodium_at.cfg', | ||
'Implementation-Title': project.name, | ||
'Implementation-Version': mod_version, | ||
'Implementation-Vendor': mod_authors, | ||
'Implementation-Timestamp': new Date().format('yyyy-MM-dd\'T\'HH:mm:ssZ') | ||
]) | ||
attributes ( | ||
"FMLCorePluginContainsFMLMod": true, | ||
"ForceLoadAsMod": true, | ||
"MixinConfigs": "sodium.mixins.json", | ||
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker" | ||
) | ||
} | ||
} | ||
|
||
jar.finalizedBy('reobfJar') | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
artifact jar | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url "file://${project.projectDir}/mcmodsrepo" | ||
} | ||
} | ||
} | ||
processResources { | ||
from "common/src/main/resources" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/main/java/me/jellysquid/mods/sodium/client/gl/attribute/GlVertexAttributeFormat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
src/main/java/me/jellysquid/mods/sodium/client/gl/buffer/GlBufferTarget.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
src/main/java/me/jellysquid/mods/sodium/client/gl/buffer/GlBufferUsage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.