Update to neoforge
This commit is contained in:
parent
fa67381990
commit
b954fead1c
4 changed files with 77 additions and 58 deletions
48
build.gradle
48
build.gradle
|
@ -1,9 +1,10 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'eclipse'
|
id 'eclipse'
|
||||||
|
id 'java-library'
|
||||||
id 'idea'
|
id 'idea'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
|
id 'net.neoforged.gradle' version '[6.0.18,6.2)'
|
||||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
|
id 'org.spongepowered.mixin' version '0.7.+'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = mod_version
|
version = mod_version
|
||||||
|
@ -13,6 +14,11 @@ base {
|
||||||
archivesName = mod_id
|
archivesName = mod_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
withJavadocJar()
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
|
||||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
|
||||||
|
@ -61,7 +67,7 @@ minecraft {
|
||||||
runs {
|
runs {
|
||||||
// applies to all the run configs below
|
// applies to all the run configs below
|
||||||
configureEach {
|
configureEach {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file("run/${it.name}")
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
// Recommended logging data for a userdev environment
|
||||||
// The markers can be added/remove as needed separated by commas.
|
// The markers can be added/remove as needed separated by commas.
|
||||||
|
@ -89,7 +95,7 @@ minecraft {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
property 'forge.enabledGameTestNamespaces', mod_id
|
property 'forge.enabledGameTestNamespaces', mod_id
|
||||||
//args '--nogui'
|
args '--nogui'
|
||||||
}
|
}
|
||||||
|
|
||||||
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
||||||
|
@ -100,8 +106,8 @@ minecraft {
|
||||||
}
|
}
|
||||||
|
|
||||||
data {
|
data {
|
||||||
// example of overriding the workingDirectory set in configureEach above
|
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
|
||||||
workingDirectory project.file('run-data')
|
// workingDirectory project.file('run-data')
|
||||||
|
|
||||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
// 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/')
|
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||||
|
@ -150,7 +156,7 @@ dependencies {
|
||||||
// The "userdev" classifier will be requested and setup by ForgeGradle.
|
// The "userdev" classifier will be requested and setup by ForgeGradle.
|
||||||
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
|
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
|
||||||
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
|
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
|
||||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
minecraft "net.neoforged:forge:${minecraft_version}-${neo_version}"
|
||||||
|
|
||||||
implementation fg.deobf("dev.zontreck:LibZontreckMod:${libzontreck}")
|
implementation fg.deobf("dev.zontreck:LibZontreckMod:${libzontreck}")
|
||||||
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
||||||
|
@ -173,13 +179,13 @@ dependencies {
|
||||||
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
|
// 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.
|
// 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
|
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
|
||||||
tasks.named('processResources', ProcessResources).configure {
|
tasks.withType(ProcessResources).configureEach {
|
||||||
var replaceProperties = [
|
var replaceProperties = [
|
||||||
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
|
minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
|
||||||
forge_version: forge_version, forge_version_range: forge_version_range,
|
neo_version : neo_version, neo_version_range: neo_version_range,
|
||||||
loader_version_range: loader_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_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
|
||||||
mod_authors: mod_authors, mod_description: mod_description,
|
mod_authors : mod_authors, mod_description: mod_description, pack_format_number: pack_format_number,
|
||||||
]
|
]
|
||||||
inputs.properties replaceProperties
|
inputs.properties replaceProperties
|
||||||
|
|
||||||
|
@ -188,6 +194,7 @@ tasks.named('processResources', ProcessResources).configure {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading at runtime.
|
// Example for how to get properties into the manifest for reading at runtime.
|
||||||
tasks.named('jar', Jar).configure {
|
tasks.named('jar', Jar).configure {
|
||||||
manifest {
|
manifest {
|
||||||
|
@ -206,25 +213,36 @@ tasks.named('jar', Jar).configure {
|
||||||
finalizedBy 'reobfJar'
|
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:
|
// 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 {
|
// tasks.named('publish').configure {
|
||||||
// dependsOn 'reobfJar'
|
// dependsOn 'reobfJar'
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Example configuration to allow publishing using the maven-publish plugin
|
def MAVEN_PASSWORD_PROPERTY = "AriasCreationsMavenPassword"
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
register('mavenJava', MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
artifact jar
|
artifact jar
|
||||||
|
artifact sourcesJar
|
||||||
|
artifact javadocJar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "file://${project.projectDir}/mcmodsrepo"
|
url = "https://maven.zontreck.com/repository/zontreck"
|
||||||
|
name = "ariascreations"
|
||||||
|
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
|
||||||
|
credentials {
|
||||||
|
username = "admin"
|
||||||
|
password = project.findProperty(MAVEN_PASSWORD_PROPERTY)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,21 @@
|
||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
libzontreck=1.10.021324.2257
|
libzontreck=1.10.021424.1759
|
||||||
|
|
||||||
## Environment Properties
|
## Environment Properties
|
||||||
|
|
||||||
# The Minecraft version must agree with the Forge version to get a valid artifact
|
# The Minecraft version must agree with the Neo version to get a valid artifact
|
||||||
minecraft_version=1.20.1
|
minecraft_version=1.20.1
|
||||||
# The Minecraft version range can use any release version of Minecraft as bounds.
|
# 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
|
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||||
# as they do not follow standard versioning conventions.
|
# as they do not follow standard versioning conventions.
|
||||||
minecraft_version_range=[1.20.1,1.21)
|
minecraft_version_range=[1.20,1.21)
|
||||||
# The Forge version must agree with the Minecraft version to get a valid artifact
|
# The Neo version must agree with the Minecraft version to get a valid artifact
|
||||||
forge_version=47.2.0
|
neo_version=47.1.65
|
||||||
# The Forge version range can use any version of Forge as bounds or match the loader version range
|
# The Neo version range can use any version of Neo as bounds or match the loader version range
|
||||||
forge_version_range=[47,)
|
neo_version_range=[47.1,)
|
||||||
# The loader version range can only use the major version of Forge/FML as bounds
|
# The loader version range can only use the major version of Neo/FML as bounds
|
||||||
loader_version_range=[47,)
|
loader_version_range=[47,)
|
||||||
# The mapping channel to use for mappings.
|
# The mapping channel to use for mappings.
|
||||||
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
|
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
|
||||||
|
@ -29,15 +29,14 @@ loader_version_range=[47,)
|
||||||
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
|
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
|
||||||
#
|
#
|
||||||
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
||||||
# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
# See more information here: https://github.com/neoforged/NeoForm/blob/main/Mojang.md
|
||||||
#
|
#
|
||||||
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
|
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
|
||||||
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
|
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
|
||||||
mapping_channel=parchment
|
mapping_channel=official
|
||||||
# The mapping version to query from the mapping channel.
|
# The mapping version to query from the mapping channel.
|
||||||
# This must match the format required by the mapping channel.
|
# This must match the format required by the mapping channel.
|
||||||
mapping_version=2023.09.03-1.20.1
|
mapping_version=1.20.1
|
||||||
|
|
||||||
|
|
||||||
## Mod Properties
|
## Mod Properties
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ mod_name=Aria's Essentials
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=GPLv3
|
mod_license=GPLv3
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.2.021424.0009
|
mod_version=1.2.021424.1816
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# 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.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
@ -57,4 +56,6 @@ mod_group_id=dev.zontreck
|
||||||
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
||||||
mod_authors=zontreck
|
mod_authors=zontreck
|
||||||
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
||||||
mod_description=A mod with custom commands that are essential
|
mod_description=A mod with custom commands that are essential
|
||||||
|
# Pack version - this changes each minecraft release, in general.
|
||||||
|
pack_format_number=15
|
|
@ -11,7 +11,7 @@ loaderVersion="${loader_version_range}" #mandatory This is typically bumped ever
|
||||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||||
license="${mod_license}"
|
license="${mod_license}"
|
||||||
# A URL to refer people to when problems occur with this mod
|
# A URL to refer people to when problems occur with this mod
|
||||||
issueTrackerURL="https://github.com/zontreck/Arias-Essentials/issues/" #optional
|
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||||
[[mods]] #mandatory
|
[[mods]] #mandatory
|
||||||
# The modid of the mod
|
# The modid of the mod
|
||||||
|
@ -25,7 +25,7 @@ displayName="${mod_name}" #mandatory
|
||||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||||
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
|
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
|
||||||
# A file name (in the root of the mod JAR) containing a logo for display
|
# A file name (in the root of the mod JAR) containing a logo for display
|
||||||
logoFile="ariasessentials.png" #optional
|
#logoFile="examplemod.png" #optional
|
||||||
# A text field displayed in the mod UI
|
# A text field displayed in the mod UI
|
||||||
#credits="" #optional
|
#credits="" #optional
|
||||||
# A text field displayed in the mod UI
|
# A text field displayed in the mod UI
|
||||||
|
@ -42,33 +42,33 @@ authors="${mod_authors}" #optional
|
||||||
description='''${mod_description}'''
|
description='''${mod_description}'''
|
||||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||||
[[dependencies.${mod_id}]] #optional
|
[[dependencies.${mod_id}]] #optional
|
||||||
# the modid of the dependency
|
# the modid of the dependency
|
||||||
modId="forge" #mandatory
|
modId="forge" #mandatory
|
||||||
# Does this dependency have to exist - if not, ordering below must be specified
|
# Does this dependency have to exist - if not, ordering below must be specified
|
||||||
mandatory=true #mandatory
|
mandatory=true #mandatory
|
||||||
# The version range of the dependency
|
# The version range of the dependency
|
||||||
versionRange="${forge_version_range}" #mandatory
|
versionRange="${neo_version_range}" #mandatory
|
||||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
|
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
|
||||||
# BEFORE - This mod is loaded BEFORE the dependency
|
# BEFORE - This mod is loaded BEFORE the dependency
|
||||||
# AFTER - This mod is loaded AFTER the dependency
|
# AFTER - This mod is loaded AFTER the dependency
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
|
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
# Here's another dependency
|
# Here's another dependency
|
||||||
[[dependencies.${mod_id}]]
|
[[dependencies.${mod_id}]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
||||||
versionRange="${minecraft_version_range}"
|
versionRange="${minecraft_version_range}"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
[[dependencies.${mod_id}]]
|
|
||||||
modId="libzontreck"
|
|
||||||
mandatory=true
|
|
||||||
versionRange="[1.10,1.11)"
|
|
||||||
ordering="NONE"
|
|
||||||
side="BOTH"
|
|
||||||
|
|
||||||
|
[[dependencies.${mod_id}]]
|
||||||
|
modId="libzontreck"
|
||||||
|
mandatory=true
|
||||||
|
versionRange="[1.10,1.11)"
|
||||||
|
ordering="NONE"
|
||||||
|
side="BOTH"
|
||||||
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
|
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
|
||||||
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
|
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
|
||||||
# stop your mod loading on the server for example.
|
# stop your mod loading on the server for example.
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
"description": {
|
"description": {
|
||||||
"text": "${mod_id} resources"
|
"text": "${mod_id} resources"
|
||||||
},
|
},
|
||||||
"pack_format": 15
|
"pack_format": ${pack_format_number}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue