Skip to content

Commit

Permalink
Merge pull request #9 from Mrbysco/1.21
Browse files Browse the repository at this point in the history
Port to 1.21.1
  • Loading branch information
Buuz135 authored Oct 13, 2024
2 parents 57824e1 + 698bc70 commit 9960136
Show file tree
Hide file tree
Showing 61 changed files with 679 additions and 554 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk 17
- name: setup jdk 21
uses: actions/setup-java@v1
with:
java-version: "17"
java-version: "21"
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
Expand All @@ -34,11 +34,13 @@ jobs:
files-secondary: build/libs/*-@(dev|sources).jar
version-type: beta
version: ${{ github.ref_name }}
loaders: forge
game-versions: 1.20.1
java: 17
loaders: neoforge
game-versions: |
1.21
1.21.1
java: 21
name: ""
changelog: "https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing-Souls/blob/master/CHANGELOG.md"
changelog: "https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing-Souls/blob/1.21/CHANGELOG.md"
dependencies: |
titanium | depends
industrial-foregoing | depends
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 1.10.0
* Updated to 1.21 by MrBysco

# Version 1.0.9

* Made Soul Surges able to connect from any side, closes #7
Expand Down
158 changes: 80 additions & 78 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,74 +1,51 @@
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'net.neoforged.moddev' version '1.0.20'
}

apply plugin: 'net.minecraftforge.gradle'

group = 'com.buuz135'
version = "${minecraftVersion}-${project.modVersion}"
version = "${project.minecraft_version}-${project.mod_version}"

java {
archivesBaseName = 'industrial-foregoing-souls'
toolchain.languageVersion = JavaLanguageVersion.of(17)
base {
archivesName = 'industrial-foregoing-souls'
}

minecraft {
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager

mappings channel: 'official', version: '1.20.1'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
neoForge {
version = "${neo_version}"
//accessTransformers.add(file('src/main/resources/META-INF/accesstransformer.cfg'))
parchment {
minecraftVersion = '1.21'
mappingsVersion = '2024.07.28'
}

runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

mods {
industrialforegoingsouls {
source sourceSets.main
}
}
client()
}

server {
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

mods {
industrialforegoingsouls {
source sourceSets.main
}
}
server()
}

data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

args '--mod', 'industrialforegoingsouls', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
data()
programArguments.addAll '--mod', "${mod_id}", '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}

mods {
industrialforegoingsouls {
source sourceSets.main
}
}
mods {
industrialforegoing {
sourceSet sourceSets.main
}
}

}

// Include resources generated by data generators.
Expand All @@ -79,39 +56,64 @@ repositories {
name 'jared maven'
url "https://maven.blamejared.com/"
}

maven {
url = "https://www.cursemaven.com"
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
repositories {
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
}
//maven { url 'https://modmaven.dev/' }
}

dependencies {
compileOnly("mezz.jei:jei-1.21.1-neoforge-api:${jei_version}")
runtimeOnly("mezz.jei:jei-1.21.1-neoforge:${jei_version}")
implementation project.dependencies.create('com.hrznstudio:titanium:1.21-4.0.21')
implementation project.dependencies.create('com.buuz135:industrialforegoing:1.21-3.6.13')
implementation "vazkii.patchouli:Patchouli:${patchouli_version}"
compileOnly "dev.emi:emi-neoforge:${emi_version}:api"
runtimeOnly "dev.emi:emi-neoforge:${emi_version}"
}

minecraft 'net.minecraftforge:forge:1.20.1-47.1.1'
implementation fg.deobf(project.dependencies.create('com.hrznstudio:titanium:1.20.1-3.8.24'))
implementation fg.deobf(project.dependencies.create('com.buuz135:industrial-foregoing:1.20.1-3.5.9'))
compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.23")
compileOnly fg.deobf("mezz.jei:jei-1.20.1-forge-api:15.2.0.23")
// at runtime, use the full JEI jar for Forge
runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.23")

annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
// 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.
// 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 = [
minecraft_version : minecraft_version,
minecraft_version_range: minecraft_version_range,
neo_version : neo_version,
neo_version_range : neo_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
]
inputs.properties replaceProperties

filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}

// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
"Specification-Title" : "industrialforegoingsouls",
"Specification-Vendor" : "Buuz135",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "Buuz135",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}

jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
44 changes: 42 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
minecraftVersion=1.20.1
modVersion=1.0.9
org.gradle.debug=false

## Environment Properties
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
# The Minecraft version must agree with the Neo version to get a valid artifact
minecraft_version=1.21.1
# The Minecraft version range can use any release version of Minecraft as bounds.
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.21.0,1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.1.65
# The Neo version range can use any version of Neo as bounds
neo_version_range=[21,)
# The loader version range can only use the major version of FML as bounds
loader_version_range=[4,)
# Uncomment this to activate parchment
#neogradle.subsystems.parchment.minecraftVersion=1.21.0
#neogradle.subsystems.parchment.mappingsVersion=SET_ME
## Mod Properties
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
# Must match the String constant located in the main mod class annotated with @Mod.
mod_id=industrialforegoingsouls
# The human-readable display name for the mod.
mod_name=Industrial Foregoing Souls
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=1.10.0
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=com.buuz135
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=Buuz135, Rid
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Industrial Foregoing
jei_version=19.11.0.128
patchouli_version=1.21-87-NEOFORGE
emi_version=1.1.12+1.21
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 9960136

Please sign in to comment.