feat: add forge support

This commit is contained in:
2023-02-06 16:47:16 -05:00
parent 10ab15bd4d
commit a9ca8a8e19
21 changed files with 305 additions and 75 deletions

69
forge/build.gradle Normal file
View File

@@ -0,0 +1,69 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}
architectury {
injectInjectables = false
platformSetupLoomIde()
forge()
}
loom {
forge {
mixinConfig "noreportbutton.mixins.json"
}
}
configurations {
common
shadowCommon
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentForge.extendsFrom common
archivesBaseName = rootProject.archives_base_name + "-forge"
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.properties["forge_version"]}"
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}
shadowJar {
exclude "fabric.mod.json"
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}

1
forge/gradle.properties Normal file
View File

@@ -0,0 +1 @@
loom.platform=forge

View File

@@ -0,0 +1,7 @@
package me.lucaslah.nrb;
import net.minecraftforge.fml.common.Mod;
@Mod("noreportbutton")
public class NoReportButtonForge {
}

View File

@@ -0,0 +1,27 @@
modLoader = "javafml"
loaderVersion = "[43,)"
license = "GNU LESSER GENERAL PUBLIC LICENSE"
[[mods]]
modId = "noreportbutton"
version = "${version}"
displayName = "No Report Button"
authors = "Lucaslah"
description = '''
Removes the chat report button from the multiplayer menu screen
'''
logoFile = "icon.png"
[[dependencies.noreportbutton]]
modId = "forge"
mandatory = true
versionRange = "[43,)"
ordering = "NONE"
side = "CLIENT"
[[dependencies.noreportbutton]]
modId = "minecraft"
mandatory = true
versionRange = "[1.19.3,)"
ordering = "NONE"
side = "CLIENT"

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,6 @@
{
"pack": {
"description": "NoReportButton",
"pack_format": 9
}
}