Skip to content

Commit

Permalink
Merge pull request #291 from Matyrobbrt/1.21
Browse files Browse the repository at this point in the history
Port to NeoForge 1.21
  • Loading branch information
Buuz135 authored Jul 6, 2024
2 parents d6274ab + 90ad411 commit d203314
Show file tree
Hide file tree
Showing 347 changed files with 6,574 additions and 6,045 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/1-21-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: 1.20 Bug report
about: Create a report to help us improve
title: "[1.21] Issue Title"
labels: 'type: bug, version: 1.21'
assignees: ''

---
**DO NOT REPORT AN ISSUE IF YOU HAVEN'T TESTED THE ISSUE WITH THE LATEST VERSION IN CURSEFORGE**

**Functional Storage Version:**

**Titanium Version:**

**Crashlog If Applicable (Upload to pastebin/gist):**
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ 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
java: 21
name: ""
changelog: "https://github.com/Buuz135/FunctionalStorage/blob/main/CHANGELOG.md"
dependencies: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ build
# other
eclipse
run
runs
classes

/includedMods/
169 changes: 81 additions & 88 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,117 +1,110 @@
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()
plugins {
id 'net.neoforged.moddev' version '0.1.120'
id 'maven-publish'
}

final mcVersion = project.neo_version.split('\\.', 3).with {
'1.' + it[0] + '.' + it[1]
}
version = mcVersion + "-" + mod_version
group = modGroup

sourceSets {
main {
resources.srcDir('src/generated/resources')
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}

repositories {
maven {
name = "BlameJared maven"
url = "https://maven.blamejared.com/"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}

apply plugin: 'net.minecraftforge.gradle'
base {
archivesName = modBaseName
}

group = 'com.buuz135'
version = '1.20.1-1.2.11'
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

java {
archivesBaseName = 'functionalstorage'
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
neoForge {
version = "${neo_version}"

minecraft {
parchment {
minecraftVersion = '1.21'
mappingsVersion = '2024.06.23'
}

mappings channel: 'official', version: '1.20.1'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
validateAccessTransformers = true

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 {
functionalstorage {
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 {
functionalstorage {
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', 'functionalstorage', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
functionalstorage {
source sourceSets.main
}
}
data()
programArguments.addAll '--mod', 'functionalstorage', '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
}

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

repositories {
maven {
name 'jared maven'
url "https://maven.blamejared.com/"
}

maven {
url = "https://www.cursemaven.com"
mods {
functionalstorage {
sourceSet sourceSets.main
}
titanium {
sourceSet sourceSets.main
}
}
//maven { url 'https://modmaven.dev/' }
}

dependencies {

minecraft 'net.minecraftforge:forge:1.20.1-47.1.1'
implementation fg.deobf(project.dependencies.create('com.hrznstudio:titanium:1.20.1-3.8.1-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")
implementation fg.deobf("curse.maven:the-one-probe-245211:4613250")
implementation fg.deobf("curse.maven:mekanism-268560:4866575")
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
dependencies {
compileOnly "mezz.jei:jei-1.21-common-api:$jei_version"
compileOnly "mezz.jei:jei-1.21-neoforge-api:$jei_version"
runtimeOnly "mezz.jei:jei-1.21-neoforge:$jei_version"
implementation project.dependencies.create('com.hrznstudio:titanium:1.21-4.0.12')
implementation "curse.maven:jade-324717:5444008"
compileOnly "curse.maven:the-one-probe-245211:5475189"
}

// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
"Specification-Title" : "functionalstorage",
"Specification-Vendor" : "Buuz135, Rid",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "Buuz135, Rid",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
attributes(["Specification-Title" : project.name,
"Specification-Vendor" : "Buuz135, Rid",
"Specification-Version" : "1.0",
"Implementation-Title" : project.name,
"Implementation-Version" : "${project.version}",
"Implementation-Vendor" : "Buuz135, Rid",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"ModSide" : "BOTH"
])
}
}

jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
options.compilerArgs << '-Xmaxerrs' << '500'
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name 'repo'
url(file('repo'))
}
}
}
12 changes: 7 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mc_version=1.20.1
jei_version=11.2.0.254
mekanism_version=10.3.5.474
org.gradle.jvmargs=-Xmx2048M
modGroup=com.buuz135
mod_version=1.3.0
modBaseName=functionalstorage

neo_version=21.0.47-beta
jei_version=19.0.0.14
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
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.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit d203314

Please sign in to comment.