Merge remote-tracking branch 'origin/1.19-multiloader' into 1.19-multiloader

# Conflicts:
#	Fabric/build.gradle
This commit is contained in:
Tschipp 2023-07-06 17:10:47 +02:00
commit 0f22c9650f
5 changed files with 250 additions and 232 deletions

View File

@ -1,60 +1,60 @@
plugins { plugins {
id 'java' id 'java'
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
archivesBaseName = "${mod_id}-common-${minecraft_version}" archivesBaseName = "${mod_id}-common-${minecraft_version}"
minecraft { minecraft {
version(minecraft_version) version(minecraft_version)
runs { runs {
if (project.hasProperty('common_runs_enabled') ? project.findProperty('common_runs_enabled').toBoolean() : true) { if (project.hasProperty('common_runs_enabled') ? project.findProperty('common_runs_enabled').toBoolean() : true) {
server(project.hasProperty('common_server_run_name') ? project.findProperty('common_server_run_name') : 'vanilla_server') { server(project.hasProperty('common_server_run_name') ? project.findProperty('common_server_run_name') : 'vanilla_server') {
workingDirectory(this.file("run")) workingDirectory(this.file("run"))
} }
client(project.hasProperty('common_client_run_name') ? project.findProperty('common_client_run_name') : 'vanilla_client') { client(project.hasProperty('common_client_run_name') ? project.findProperty('common_client_run_name') : 'vanilla_client') {
workingDirectory(this.file("run")) workingDirectory(this.file("run"))
} }
} }
} }
} }
repositories { repositories {
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
} }
dependencies { dependencies {
compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5' compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
implementation("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") implementation("com.github.llamalad7.mixinextras:mixinextras-common:${mixinextras_version}")
annotationProcessor("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-common:${mixinextras_version}")
} }
processResources { processResources {
def buildProps = project.properties.clone() def buildProps = project.properties.clone()
filesMatching(['pack.mcmeta']) { filesMatching(['pack.mcmeta']) {
expand buildProps expand buildProps
} }
} }
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
groupId project.group groupId project.group
artifactId project.archivesBaseName artifactId project.archivesBaseName
version project.version version project.version
from components.java from components.java
} }
} }
repositories { repositories {
maven { maven {
url "file://" + System.getenv("local_maven") url "file://" + System.getenv("local_maven")
} }
} }
} }

View File

@ -0,0 +1,17 @@
{
"__comment__": "Translated by @alpeerkaraca",
"carryon.category.settings": "Ayarlar",
"carryon.category.blacklist": "Kara Liste",
"carryon.category.modeloverrides": "Modellerin Üzerine Yaz (Gelişmiş)",
"carryon.category.custompickupconditions": "Özel Yerden Alma Durumları (Gelişmiş)",
"carryon.category.whitelist": "Beyaz Liste",
"carryon.general.modeloverrides.modeloverrides": "Modellerin Üzerine Yaz",
"carryon.general.blacklist.forbiddenentities": "Oyuncunun Alamayacağı Varlıklar",
"carryon.general.blacklist.forbiddentiles": "Oyuncunun Alamayacağı Bloklar",
"carryon.category.custompickupconditions.custompickupconditionsblocks": "Özel Blok Alma Durumları",
"carryon.category.custompickupconditions.custompickupconditionsentities": "Özel Varlık Alma Durumları",
"key.carry.desc": "Taşı Taşı",
"key.carry.category": "Taşımaya Devam Et"
}

View File

@ -33,8 +33,8 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
implementation project(":Common") implementation project(":Common")
include implementation("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") include implementation("com.github.llamalad7.mixinextras:mixinextras-fabric:${mixinextras_version}")
annotationProcessor("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${mixinextras_version}")
modImplementation "de.siphalor:amecsapi-1.19:1.3.9+mc1.19.4" modImplementation "de.siphalor:amecsapi-1.19:1.3.9+mc1.19.4"
include "de.siphalor:amecsapi-1.19:1.3.9+mc1.19.4" include "de.siphalor:amecsapi-1.19:1.3.9+mc1.19.4"

View File

@ -1,170 +1,171 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://maven.minecraftforge.net' } maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' } maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
maven { url = 'https://maven.parchmentmc.org' } maven { url = 'https://maven.parchmentmc.org' }
mavenCentral() mavenCentral()
gradlePluginPortal() gradlePluginPortal()
} }
dependencies { dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath 'org.parchmentmc:librarian:1.+' classpath 'org.parchmentmc:librarian:1.+'
classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2' classpath 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
} }
} }
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle' apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'org.spongepowered.mixin' apply plugin: 'org.spongepowered.mixin'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'org.parchmentmc.librarian.forgegradle' apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'com.github.johnrengelman.shadow'
apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle' apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle'
if (project.hasProperty('secretFile')) { if (project.hasProperty('secretFile')) {
loadSecrets(new File((String) findProperty('secretFile'))) loadSecrets(new File((String) findProperty('secretFile')))
} }
if (System.getenv('BUILD_NUMBER') != null) { if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER') version += "." + System.getenv('BUILD_NUMBER')
} }
jarJar.enable() jarJar.enable()
archivesBaseName = "${mod_id}-forge-${minecraft_version}" archivesBaseName = "${mod_id}-forge-${minecraft_version}"
mixin { mixin {
add sourceSets.main, "${mod_id}.refmap.json" add sourceSets.main, "${mod_id}.refmap.json"
config "${mod_id}.mixins.json" config "${mod_id}.mixins.json"
config "${mod_id}.forge.mixins.json" config "${mod_id}.forge.mixins.json"
} }
minecraft { minecraft {
mappings channel: 'parchment', version: "${parchment_mappings}" mappings channel: 'parchment', version: "${parchment_mappings}"
if (project.hasProperty('forge_ats_enabled') && project.findProperty('forge_ats_enabled').toBoolean()) { if (project.hasProperty('forge_ats_enabled') && project.findProperty('forge_ats_enabled').toBoolean()) {
// This location is hardcoded in Forge and can not be changed. // This location is hardcoded in Forge and can not be changed.
// https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123 // https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
project.logger.debug('Forge Access Transformers are enabled for this project.') project.logger.debug('Forge Access Transformers are enabled for this project.')
} }
runs { runs {
client { client {
workingDirectory project.file('run') workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main" ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client' taskName 'Client'
property 'mixin.env.remapRefMap', 'true' property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json" args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
mods { mods {
modClientRun { modClientRun {
source sourceSets.main source sourceSets.main
source project(":Common").sourceSets.main source project(":Common").sourceSets.main
} }
} }
} }
server { server {
workingDirectory project.file('run') workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main" ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Server' taskName 'Server'
property 'mixin.env.remapRefMap', 'true' property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json" args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
mods { mods {
modServerRun { modServerRun {
source sourceSets.main source sourceSets.main
source project(":Common").sourceSets.main source project(":Common").sourceSets.main
} }
} }
} }
data { data {
workingDirectory project.file('run') workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main" ideaModule "${rootProject.name}.${project.name}.main"
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
taskName 'Data' taskName 'Data'
property 'mixin.env.remapRefMap', 'true' property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json" args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
mods { mods {
modDataRun { modDataRun {
source sourceSets.main source sourceSets.main
source project(":Common").sourceSets.main source project(":Common").sourceSets.main
} }
} }
} }
} }
} }
sourceSets.main.resources.srcDir 'src/generated/resources' sourceSets.main.resources.srcDir 'src/generated/resources'
repositories { repositories {
maven { maven {
url 'https://maven.blamejared.com' url 'https://maven.blamejared.com'
} }
flatDir { flatDir {
dirs 'libs' dirs 'libs'
} }
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
} }
dependencies { dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
compileOnly project(":Common") compileOnly project(":Common")
minecraftLibrary("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-common:${mixinextras_version}"))
jarJar(group: 'com.github.LlamaLad7', name: 'MixinExtras', version: "[${mixinextras_version},)") implementation(jarJar("com.github.llamalad7.mixinextras:mixinextras-forge:${mixinextras_version}")) {
annotationProcessor("com.github.LlamaLad7:MixinExtras:${mixinextras_version}") jarJar.ranged(it, "[${mixinextras_version},)")
//implementation fg.deobf("net.darkhax.gamestages:GameStages-Forge-1.19.2:11.0.2") }
//implementation fg.deobf("net.darkhax.bookshelf:Bookshelf-Forge-1.19.3:17.0.2") //implementation fg.deobf("net.darkhax.gamestages:GameStages-Forge-1.19.2:11.0.2")
annotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor' //implementation fg.deobf("net.darkhax.bookshelf:Bookshelf-Forge-1.19.3:17.0.2")
annotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor'
fileTree("libs").matching {
include "*.jar" fileTree("libs").matching {
}.each { include "*.jar"
String filename = it.getName(); }.each {
filename = filename.substring(0, filename.length() - 4); String filename = it.getName();
int lastDash = filename.lastIndexOf("-"); filename = filename.substring(0, filename.length() - 4);
filename = filename.substring(0, lastDash) + ":" + filename.substring(lastDash+1, filename.length()); int lastDash = filename.lastIndexOf("-");
implementation fg.deobf("blank:${filename}") filename = filename.substring(0, lastDash) + ":" + filename.substring(lastDash+1, filename.length());
} implementation fg.deobf("blank:${filename}")
} }
}
reobf {
jarJar {} reobf {
} jarJar {}
}
tasks.withType(JavaCompile) {
source(project(":Common").sourceSets.main.allSource) tasks.withType(JavaCompile) {
} source(project(":Common").sourceSets.main.allSource)
}
processResources {
from project(":Common").sourceSets.main.resources processResources {
from project(":Common").sourceSets.main.resources
filesMatching('*.mixins.json') {
expand "refmap_target": "${mod_id}." filesMatching('*.mixins.json') {
} expand "refmap_target": "${mod_id}."
} }
}
jar.finalizedBy('reobfJar')
jar.finalizedBy('reobfJar')
publishing {
publications { publishing {
mavenJava(MavenPublication) { publications {
groupId project.group mavenJava(MavenPublication) {
artifactId project.archivesBaseName groupId project.group
version project.version artifactId project.archivesBaseName
artifact jar version project.version
} artifact jar
} }
repositories { }
maven { repositories {
url "file://" + System.getenv("local_maven") maven {
} url "file://" + System.getenv("local_maven")
} }
} }
}

View File

@ -31,4 +31,4 @@ mod_id=carryon
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false org.gradle.daemon=false
mixinextras_version=0.1.1 mixinextras_version=0.2.0-beta.6