Skip to content

Commit

Permalink
1.21 port
Browse files Browse the repository at this point in the history
  • Loading branch information
P3pp3rF1y committed Aug 12, 2024
1 parent 71b3fcd commit add619b
Show file tree
Hide file tree
Showing 236 changed files with 1,377 additions and 1,452 deletions.
105 changes: 62 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.142'
id 'net.neoforged.moddev' version '1.0.14'
id "org.sonarqube" version "5.0.0.4638"
}

Expand All @@ -18,7 +18,6 @@ group = mod_group_id

repositories {
mavenCentral()
maven { url "https://maven.theillusivec4.top/" }
maven { url "https://maven.tterrag.com/" }
maven { url = "https://modmaven.dev/" }
maven { url "https://minecraft.curseforge.com/api/maven/" }
Expand Down Expand Up @@ -48,52 +47,66 @@ base {

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

minecraft {
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
//entry('public net.minecraft.world.item.crafting.ShapelessRecipe result #result')
}
}
neoForge {
version = project.neo_version

runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
systemProperty 'mixin.env.disableRefMap', 'true'
modSource project.sourceSets.main
parchment {
mappingsVersion = project.parchment_mappings_version
minecraftVersion = project.parchment_minecraft_version
}

client {
}
accessTransformers = project.files('src/main/resources/META-INF/accesstransformer.cfg')

client2 {
configure ("client")
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
systemProperty 'mixin.env.disableRefMap', 'true'
}

programArguments.addAll '--username', 'Dev2'
}
client {
client()
}

server {
programArgument '--nogui'
}
client2 {
client()

data {
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
programArguments.addAll '--username', 'Dev2'
}

/*
if (findProject(':SophisticatedCore') != null) {
modSource project(':SophisticatedCore').sourceSets.main
server {
server()
programArgument '--nogui'
}

data {
data()
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()

/*
if (findProject(':SophisticatedCore') != null) {
modSource project(':SophisticatedCore').sourceSets.main
}
*/
}
}

mods {
"${mod_id}" {
sourceSet(sourceSets.main)
}
*/
}
}

sourceSets.main.resources {
srcDir 'src/generated/resources'
}

dependencies {
implementation "net.neoforged:neoforge:${neo_version}"
configurations {
runtimeClasspath.extendsFrom localRuntime
}

dependencies {
if (findProject(':SophisticatedCore') != null) {
dependencies.implementation project(':SophisticatedCore')
} else {
Expand All @@ -108,19 +121,19 @@ dependencies {
// implementation files('/libs/sophisticatedcore-1.20.4-0.6.18.-SNAPSHOT.jar')

compileOnly "mezz.jei:jei-${jei_mc_version}:${jei_version}"
runtimeOnly "mezz.jei:jei-${jei_mc_version}:${jei_version}"
compileOnly "top.theillusivec4.curios:curios-neoforge:${curios_version}:api"
runtimeOnly "top.theillusivec4.curios:curios-neoforge:${curios_version}"
localRuntime "mezz.jei:jei-${jei_mc_version}:${jei_version}"
compileOnly "curse.maven:curios-1037991:${curios_cf_file_id}"
localRuntime "curse.maven:curios-1037991:${curios_cf_file_id}"
compileOnly "curse.maven:balm-531761:${balm_cf_file_id}"
runtimeOnly "curse.maven:balm-531761:${balm_cf_file_id}"
localRuntime "curse.maven:balm-531761:${balm_cf_file_id}"
compileOnly "curse.maven:craftingtweaks-233071:${crafting_tweaks_cf_file_id}"
runtimeOnly "curse.maven:craftingtweaks-233071:${crafting_tweaks_cf_file_id}"
localRuntime "curse.maven:craftingtweaks-233071:${crafting_tweaks_cf_file_id}"
compileOnly "curse.maven:chipped-456956:${chipped_cf_file_id}"
runtimeOnly "curse.maven:chipped-456956:${chipped_cf_file_id}"
localRuntime "curse.maven:chipped-456956:${chipped_cf_file_id}"
compileOnly "curse.maven:athena-841890:${athena_cf_file_id}"
runtimeOnly "curse.maven:athena-841890:${athena_cf_file_id}"
localRuntime "curse.maven:athena-841890:${athena_cf_file_id}"
compileOnly "curse.maven:resourcefullib-570073:${resourcefullib_cf_file_id}"
runtimeOnly "curse.maven:resourcefullib-570073:${resourcefullib_cf_file_id}"
localRuntime "curse.maven:resourcefullib-570073:${resourcefullib_cf_file_id}"
/*
compileOnly "vazkii.botania:Botania:${botania_version}:api")
runtimeOnly "vazkii.botania:Botania:${botania_version}")
Expand All @@ -129,7 +142,7 @@ dependencies {
*/
}

tasks.withType(ProcessResources).configureEach {
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
var replaceProperties = [
minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
neo_version : neo_version, neo_version_range: neo_version_range,
Expand All @@ -142,11 +155,17 @@ tasks.withType(ProcessResources).configureEach {
]
inputs.properties replaceProperties

filesMatching(['META-INF/mods.toml']) {
expand replaceProperties + [project: project]
}
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

test {
useJUnitPlatform()
testLogging {
Expand Down
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.debug=false

neogradle.subsystems.parchment.minecraftVersion=1.20.6
neogradle.subsystems.parchment.mappingsVersion=2024.05.01
parchment_minecraft_version=1.21
parchment_mappings_version=2024.07.07
minecraft_version=1.21
minecraft_version_range=[1.21,1.21.1)
neo_version=21.0.0-beta
neo_version=21.0.143
neo_version_range=[21.0.0-beta,)
loader_version_range=[4,)

Expand All @@ -25,13 +25,13 @@ sonar_project_key=sophisticatedbackpacks:SophisticatedBackpacks
github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedBackpacks

jei_mc_version=1.21-neoforge
jei_version=19.0.0.1
curios_version=8.0.0+1.20.6
jei_version=19.8.0.97
#botania_version=1.19.2-439-FORGE-SNAPSHOT
#patchouli_version=1.19.2-78-SNAPSHOT
balm_cf_file_id=5139962
crafting_tweaks_cf_file_id=5140232
chipped_cf_file_id=5081543
resourcefullib_cf_file_id=5180841
athena_cf_file_id=5176890
sc_version=[1.20.4-0.6.17,1.21)
balm_cf_file_id=5525369
crafting_tweaks_cf_file_id=5426925
chipped_cf_file_id=5506938
resourcefullib_cf_file_id=5483169
athena_cf_file_id=5431579
curios_cf_file_id=5546342
sc_version=[1.21,1.22)
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:compacting_upgrade"
]
"items": "sophisticatedbackpacks:compacting_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:deposit_upgrade"
]
"items": "sophisticatedbackpacks:deposit_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:feeding_upgrade"
]
"items": "sophisticatedbackpacks:feeding_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:filter_upgrade"
]
"items": "sophisticatedbackpacks:filter_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:advanced_pickup_upgrade"
]
"items": "sophisticatedbackpacks:advanced_pickup_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:magnet_upgrade"
]
"items": "sophisticatedbackpacks:magnet_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:pickup_upgrade"
]
"items": "sophisticatedbackpacks:pickup_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:pump_upgrade"
]
"items": "sophisticatedbackpacks:pump_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:refill_upgrade"
]
"items": "sophisticatedbackpacks:refill_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:restock_upgrade"
]
"items": "sophisticatedbackpacks:restock_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:tool_swapper_upgrade"
]
"items": "sophisticatedbackpacks:tool_swapper_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:void_upgrade"
]
"items": "sophisticatedbackpacks:void_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:upgrade_base"
]
"items": "sophisticatedbackpacks:upgrade_base"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:blasting_upgrade"
]
"items": "sophisticatedbackpacks:blasting_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:auto_smelting_upgrade"
]
"items": "sophisticatedbackpacks:auto_smelting_upgrade"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:smelting_upgrade"
]
"items": "sophisticatedbackpacks:smelting_upgrade"
}
]
},
Expand Down
Loading

0 comments on commit add619b

Please sign in to comment.