Created
August 15, 2022 12:33
-
-
Save Lanse505/0dcd4770fbdad67d47b8e92582d9a84b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The overall format is standard TOML format, v0.5.0: https://github.com/toml-lang/toml | |
modLoader = "javafml" #mandatory | |
loaderVersion = "[${loader_version},)" | |
license = "${license}" | |
issueTrackerURL = "${issue_tracker_url}" | |
[[mods]] | |
modId = "${modId}" #mandatory | |
version = "${file.jarVersion}" #mandatory | |
displayName = "${modName}" #mandatory | |
#updateJSONURL="http://myurl.me/" #optional | |
displayURL= "${displayURL}" #optional | |
#logoFile="culinarium.png" #optional | |
#credits="Thanks for this example mod goes to Java" #optional | |
authors = "Lanse505" #optional | |
description = "${modDesc}" | |
[[dependencies.culinarium]] #optional | |
modId = "forge" #mandatory | |
mandatory = true #mandatory | |
versionRange = "[${forge_version},)" #mandatory | |
ordering = "NONE" | |
side = "BOTH" | |
[[dependencies.culinarium]] | |
modId = "minecraft" | |
mandatory = true | |
versionRange = "[1.19.2,1.20)" | |
ordering = "NONE" | |
side = "BOTH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { url = 'https://maven.parchmentmc.org' } | |
maven { url = 'https://repo.spongepowered.org/maven/' } | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'org.parchmentmc:librarian:1.+' | |
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' | |
} | |
} | |
plugins { | |
id 'net.minecraftforge.gradle' version '5.1.+' | |
} | |
apply plugin: 'java' | |
apply plugin: 'idea' | |
apply plugin: 'org.spongepowered.mixin' | |
apply plugin: 'org.parchmentmc.librarian.forgegradle' | |
group = project.group | |
version = "$project.minecraft_version-$project.major_version.$project.minor_version.$project.patch_version-$project.revision_version" | |
java.toolchain() { | |
languageVersion = JavaLanguageVersion.of(17) | |
vendor = JvmVendorSpec.ADOPTOPENJDK | |
} | |
def version_properties = [ | |
"loader_version" : loaderVersion, | |
"license" : license, | |
"issue_tracker_url" : issueTrackerURL, | |
"mod_id" : modId, | |
"version" : "$project.major_version.$project.minor_version.$project.patch_version-$project.revision_version", | |
"mod_name" : modName, | |
"display_url" : displayURL, | |
"forge_version" : forge_version, | |
"description" : modDesc, | |
"mixin_version" : mixinVersion | |
] | |
processResources { | |
outputs.upToDateWhen { false } | |
duplicatesStrategy(DuplicatesStrategy.EXCLUDE) | |
from(sourceSets.main.resources) { | |
include "META-INF/mods.toml" | |
include project.mixinPath | |
expand version_properties | |
} | |
into "$buildDir/resources/main/" | |
} | |
minecraft { | |
mappings channel: project.mappings_type, version: project.mappings_version | |
if (project.modTransformer) { | |
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') | |
} | |
runs { | |
client { | |
workingDirectory project.file('run') | |
// Recommended logging data for a userdev environment | |
// The markers can be added/remove as needed separated by commas. | |
// "SCAN": For mods scan. | |
// "REGISTRIES": For firing of registry events. | |
// "REGISTRYDUMP": For getting the contents of all registries. | |
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' | |
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces. | |
property 'forge.enabledGameTestNamespaces', "$modId" | |
mods { | |
culinarium { | |
source sourceSets.main | |
} | |
} | |
} | |
server { | |
workingDirectory project.file('run') | |
property 'forge.logging.markers', 'REGISTRIES' | |
property 'forge.logging.console.level', 'debug' | |
property 'forge.enabledGameTestNamespaces', "$modId" | |
mods { | |
culinarium { | |
source sourceSets.main | |
} | |
} | |
} | |
// This run config launches GameTestServer and runs all registered gametests, then exits. | |
// By default, the server will crash when no gametests are provided. | |
// The gametest system is also enabled by default for other run configs under the /test command. | |
gameTestServer { | |
workingDirectory project.file('run') | |
property 'forge.logging.markers', 'REGISTRIES' | |
property 'forge.logging.console.level', 'debug' | |
property 'forge.enabledGameTestNamespaces', "$modId" | |
mods { | |
culinarium { | |
source sourceSets.main | |
} | |
} | |
} | |
data { | |
workingDirectory project.file('run') | |
property 'forge.logging.markers', 'REGISTRIES' | |
property 'forge.logging.console.level', 'debug' | |
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. | |
args '--mod', "$modId", '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') | |
mods { | |
culinarium { | |
source sourceSets.main | |
} | |
} | |
} | |
} | |
} | |
// Include resources generated by data generators. | |
sourceSets.main.resources { srcDir 'src/generated/resources' } | |
repositories { | |
// External Deps | |
maven { | |
name = 'Mixins' | |
url = 'https://repo.spongepowered.org/maven/' | |
} | |
maven { | |
name = "Titanium" | |
url = 'https://maven.blamejared.com/' | |
} | |
maven { | |
name = "JEI" | |
url = 'https://dvs1.progwml6.com/files/maven' | |
} | |
// Local Deps | |
mavenCentral() | |
} | |
dependencies { | |
minecraft 'net.minecraftforge:forge:1.19.2-43.0.8' | |
// Mixin | |
annotationProcessor fg.deobf("org.spongepowered:mixin:$mixinVersion:processor") | |
// Titanium | |
implementation fg.deobf(project.dependencies.create("com.hrznstudio:titanium:${titanium_version}") { | |
transitive = false | |
}) | |
// JEI | |
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}") | |
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}") | |
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}") | |
} | |
// Example for how to get properties into the manifest for reading at runtime. | |
jar { | |
finalizedBy 'reobfJar' | |
manifest { | |
attributes([ | |
"Specification-Title" : project.modName, | |
"Specification-Vendor" : project.group, | |
"Specification-Version" : "1", // We are version 1 of ourselves | |
"Implementation-Title" : project.name, | |
"Implementation-Version" : project.jar.archiveVersion, | |
"Implementation-Vendor" : "${major_version}-${minor_version}-${patch_version}", | |
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), | |
'MixinConfigs' : "${project.modId}.mixins.json" | |
]) | |
} | |
} | |
// Setup mixin reference map | |
mixin { | |
add sourceSets.main, "${project.modId}.refmap.json" | |
} | |
tasks.withType(JavaCompile).configureEach { | |
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "main" java.lang.RuntimeException: java.net.MalformedURLException: no protocol: ${issue_tracker_url} | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.StringUtils.toURL(StringUtils.java:36) | |
at java.base/java.util.Optional.map(Optional.java:260) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModFileInfo.<init>(ModFileInfo.java:62) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModFileParser.modsTomlParser(ModFileParser.java:47) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModFileParser.readModList(ModFileParser.java:31) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModFile.<init>(ModFile.java:79) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModFile.<init>(ModFile.java:68) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.AbstractModProvider.createMod(AbstractModProvider.java:52) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator.lambda$scanMods$6(MinecraftLocator.java:43) | |
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) | |
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) | |
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) | |
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) | |
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) | |
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) | |
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) | |
at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator.scanMods(MinecraftLocator.java:47) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:74) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:166) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.FMLServiceProvider.beginScanning(FMLServiceProvider.java:86) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:112) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:100) | |
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) | |
at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) | |
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) | |
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) | |
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) | |
at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:102) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:55) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:87) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) | |
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) | |
at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) | |
Caused by: java.net.MalformedURLException: no protocol: ${issue_tracker_url} | |
at java.base/java.net.URL.<init>(URL.java:674) | |
at java.base/java.net.URL.<init>(URL.java:569) | |
at java.base/java.net.URL.<init>(URL.java:516) | |
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.StringUtils.toURL(StringUtils.java:34) | |
... 43 more | |
Process finished with exit code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment