Skip to content

Commit

Permalink
- updated to Minecraft 1.20.4 (Forge 49.0.38, Neoforge 20.4.225)
Browse files Browse the repository at this point in the history
- updated JEI support to 1.20.4-17.3.0.49 (Forge & Neoforge)
- updated The One Probe support to 1.20.4_neo-11.0.2-3 (Neoforge)
- rename config option "recipeBlacklist" to "recipeBlockedList"
  • Loading branch information
cech12 committed Apr 8, 2024
1 parent 4d60ca7 commit aa7b2ed
Show file tree
Hide file tree
Showing 115 changed files with 1,634 additions and 629 deletions.
15 changes: 13 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@ body:
description: What version of Minecraft were you running?
validations:
required: true
- type: dropdown
id: modLoader
attributes:
label: Mod Loader
description: What mod loader were you using?
options:
- Fabric
- Forge
- NeoForge
validations:
required: true
- type: input
id: modLoaderVersion
attributes:
label: Forge Version
description: What version of Forge were you using?
label: Mod Loader Version
description: What mod loader version were you using?
validations:
required: true
- type: input
Expand Down
54 changes: 47 additions & 7 deletions .github/workflows/cicd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,42 +33,82 @@ jobs:
needs: codeql
if: startsWith(github.ref, 'refs/tags/')
name: Publish Github
uses: cech12/MinecraftModActions/.github/workflows/publish-github.yml@main
uses: cech12/MinecraftModActions/.github/workflows/multi-publish-github.yml@main
with:
java-version: 17
mod-name: Solar Cooker
mod-id: solarcooker
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-curseforge:
publish-forge-on-curseforge:
needs: publish-github
if: startsWith(github.ref, 'refs/tags/')
name: Publish Curseforge
name: Publish Forge on Curseforge
uses: cech12/MinecraftModActions/.github/workflows/publish-curseforge.yml@main
with:
java-version: 17
subproject: forge
title-prefix: forge-
curseforge-id: 436874
game-versions: |
1.20.2
1.20.4
release-type: release
loaders: |
forge
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
publish-modrinth:
publish-forge-on-modrinth:
needs: publish-github
if: startsWith(github.ref, 'refs/tags/')
name: Publish Modrinth
name: Publish Forge on Modrinth
uses: cech12/MinecraftModActions/.github/workflows/publish-modrinth.yml@main
with:
java-version: 17
subproject: forge
title-prefix: forge-
modrinth-id: IsSapAeq
game-versions: |
1.20.2
1.20.4
release-type: release
loaders: |
forge
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}
publish-neoforge-on-curseforge:
needs: publish-github
if: startsWith(github.ref, 'refs/tags/')
name: Publish Neoforge on Curseforge
uses: cech12/MinecraftModActions/.github/workflows/publish-curseforge.yml@main
with:
java-version: 17
subproject: neoforge
title-prefix: neoforge-
curseforge-id: 436874
game-versions: |
1.20.4
release-type: release
loaders: |
neoforge
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
publish-neoforge-on-modrinth:
needs: publish-github
if: startsWith(github.ref, 'refs/tags/')
name: Publish Neoforge on Modrinth
uses: cech12/MinecraftModActions/.github/workflows/publish-modrinth.yml@main
with:
java-version: 17
subproject: neoforge
title-prefix: neoforge-
modrinth-id: IsSapAeq
game-versions: |
1.20.4
release-type: release
loaders: |
neoforge
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build
# other
eclipse
run
runs
run-data

# Files from Forge MDK
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.20.4-3.0.0.0] - 2024-04-08
### Changed
- updated to Minecraft 1.20.4 (Forge 49.0.38, Neoforge 20.4.225)
- updated JEI support to 1.20.4-17.3.0.49 (Forge & Neoforge)
- updated The One Probe support to 1.20.4_neo-11.0.2-3 (Neoforge)
- rename config option "recipeBlacklist" to "recipeBlockedList"

## [1.20.2-2.2.0.0] - 2023-10-26
### Changed
- update and move back to Forge 1.20.2-48.0.23 (from NeoForge) until it is stable
Expand Down
237 changes: 78 additions & 159 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,174 +1,93 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
// Required for NeoGradle
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
}

version = "${minecraft_version}-${mod_version}"
group = mod_group_id
base {
archivesName = mod_id
}

// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'official', version: minecraft_version

// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
// In most cases, it is not necessary to enable.
// enableEclipsePrepareRuns = true
// enableIdeaPrepareRuns = true

// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
// It is REQUIRED to be set to true for this template to function.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
copyIdeResources = true

// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
// The folder name can be set on a run configuration using the "folderName" property.
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
// generateRunFolders = true

// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

// Default run configurations.
runs {
// applies to all the run configs below
configureEach {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'

mods {
"${mod_id}" {
source sourceSets.main
source sourceSets.test
}
}
}

client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', mod_id
subprojects {
apply plugin: 'java'

version "$project.minecraft_version-$project.mod_version"

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
//java.withSourcesJar()
//java.withJavadocJar()

jar {
from(rootProject.file("LICENSE"))
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_author,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Timestamp' : System.currentTimeMillis(),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Built-On-Minecraft' : minecraft_version
])
}
}

server {
property 'forge.enabledGameTestNamespaces', mod_id
args '--nogui'
}
//sourcesJar {
// from(rootProject.file("LICENSE"))
//}

gameTestServer {
property 'forge.enabledGameTestNamespaces', mod_id
repositories {
mavenCentral()
maven {
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}

data {
// example of overriding the workingDirectory set in configureEach above
workingDirectory project.file('run-data')

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
maven {
name = 'BlameJared Maven (JEI / CraftTweaker / Bookshelf)'
url = 'https://maven.blamejared.com'
}
}
}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.getRelease().set(17)
}
maven { // TOP
url "https://maven.k-4u.nl"
}
}

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

// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-${project.minecraft_version}-common-api:${project.jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${project.minecraft_version}-forge:${project.jei_version}")
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-${project.minecraft_version}-forge:${project.jei_version}")

//implementation fg.deobf("mcjty.theoneprobe:theoneprobe:$top_version") {transitive = false}
}

tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description, mod_issue_tracker: mod_issue_tracker,
mod_url: mod_url,
jei_version_range: jei_version_range, top_version_range: top_version_range
]
inputs.properties replaceProperties

filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}

tasks.named('jar', Jar).configure {
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_authors,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_authors,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}

// This is the preferred method to reobfuscate your jar file
finalizedBy 'reobfJar'
}

// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing:
// tasks.named('publish').configure {
// dependsOn 'reobfJar'
// }

publishing {
publications {
register('mavenJava', MavenPublication) {
artifact jar
processResources {
def expandProps = [
"version": version,
"group": project.group, //Else we target the task's group.
"minecraft_version": minecraft_version,
"minecraft_version_range": minecraft_version_range,
"forge_version": forge_version,
"forge_version_range": forge_version_range,
"forge_loader_version_range": forge_loader_version_range,
//"fabric_version": fabric_version,
//"fabric_loader_version": fabric_loader_version,
"neoforge_version": neoforge_version,
"neoforge_version_range": neoforge_version_range,
"neoforge_loader_version_range": neoforge_loader_version_range,
"mod_id": mod_id,
"mod_name": mod_name,
"mod_author": mod_author,
"mod_license": mod_license,
"mod_url": mod_url,
"mod_issue_tracker": mod_issue_tracker,
"mod_description": project.description,
"jei_version": jei_version,
"jei_version_range": jei_version_range,
"top_version": top_version,
"top_version_range": top_version_range
]

filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', '*.mixins.json']) {
expand expandProps
}
inputs.properties(expandProps)
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
}
Loading

0 comments on commit aa7b2ed

Please sign in to comment.