Skip to content

Commit

Permalink
Update forge and gradle setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Nov 23, 2023
1 parent 2651e43 commit 935f18f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
41 changes: 23 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ plugins {
}

version = "${version}"
group = "com.nopoisonregen.main" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
group = "${mod_archive_name}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
base {
archivesName = "NMPR-${mc_version}"
archivesName = "${mod_archive_name}-${mc_version}"
}

// Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16.
Expand All @@ -32,12 +32,18 @@ minecraft {
client {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'nopoisonregen'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', "${mod_id}"

mods {
nopoisonregen {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -46,12 +52,18 @@ minecraft {
server {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'nopoisonregen'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', "${mod_id}"

mods {
nopoisonregen {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -61,24 +73,17 @@ minecraft {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// The markers can be changed as needed.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
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'

property 'forge.enabledGameTestNamespaces', 'nopoisonregen'

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'nopoisonregen', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
args '--mod', "${mod_id}", '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
nopoisonregen {
"${mod_id}" {
source sourceSets.main
}
}
Expand All @@ -97,12 +102,12 @@ dependencies {
jar {
manifest {
attributes([
"Specification-Title" : "nopoisonregen",
"Specification-Title" : "${mod_id}",
"Specification-Vendor" : "kara2810x",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "nopoisonregen",
"Implementation-Vendor" : "kara2810x",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
Expand Down
9 changes: 6 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

# Base info
mc_version=1.20
forge_version=46.0.14
mc_version=1.20.1
forge_version=47.1.3
mapping_channel=official
mapping_version=1.20
mapping_version=1.20.1
mod_group=com.nopoisonregen.main
mod_id=nopoisonregen
mod_archive_name=NMPR

#Publishing
mod_name=NMPR
Expand Down

0 comments on commit 935f18f

Please sign in to comment.