Removed the need for template files. Replaced logo file with png as jpg seems to not work with NeoForge.

This commit is contained in:
2026-01-12 01:22:46 +01:00
parent 06ef028b6c
commit 4bb8e9dca0
5 changed files with 24 additions and 22 deletions

BIN
assets/images/web/logo.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -138,9 +138,12 @@ dependencies {
// http://www.gradle.org/docs/current/userguide/dependency_management.html // http://www.gradle.org/docs/current/userguide/dependency_management.html
} }
// This block of code expands all declared replace properties in the specified resource targets. // This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation. // A missing property will result in an error. Properties are expanded using ${} Groovy notation.
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) { // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [ var replaceProperties = [
minecraft_version : minecraft_version, minecraft_version : minecraft_version,
minecraft_version_range: minecraft_version_range, minecraft_version_range: minecraft_version_range,
@ -152,18 +155,14 @@ var generateModMetadata = tasks.register("generateModMetadata", ProcessResources
mod_license : mod_license, mod_license : mod_license,
mod_version : mod_version, mod_version : mod_version,
mod_authors : mod_authors, mod_authors : mod_authors,
mod_description : mod_description, mod_description : mod_description
] ]
inputs.properties replaceProperties inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties expand replaceProperties
from "src/main/templates"
into "build/generated/sources/modMetadata"
} }
// Include the output of "generateModMetadata" as an input directory for the build }
// this works with both building through Gradle and the IDE.
sourceSets.main.resources.srcDir generateModMetadata
// To avoid having to run "generateModMetadata" manually, make it run on every project reload
neoForge.ideSyncTask generateModMetadata
// Example configuration to allow publishing using the maven-publish plugin // Example configuration to allow publishing using the maven-publish plugin
publishing { publishing {

View File

@ -9,7 +9,7 @@ version = "${mod_version}"
displayName = "${mod_name}" displayName = "${mod_name}"
#updateJSONURL = "http://myurl.me/" #updateJSONURL = "http://myurl.me/"
#displayURL = "http://example.com/" #displayURL = "http://example.com/"
logoFile= "logo.jpg" logoFile = "logo.png"
#credits = "" #credits = ""
authors = "${mod_authors}" authors = "${mod_authors}"
description = '''${mod_description}''' description = '''${mod_description}'''

BIN
src/main/resources/logo.jpg (Stored with Git LFS)

Binary file not shown.

BIN
src/main/resources/logo.png (Stored with Git LFS) Normal file

Binary file not shown.