Add NeoForge

This commit is contained in:
axolotlmaid 2024-06-03 00:46:49 +01:00
parent 586db38dff
commit d031876914
13 changed files with 205 additions and 181 deletions

56
neoforge/build.gradle Normal file
View file

@ -0,0 +1,56 @@
plugins {
id 'com.github.johnrengelman.shadow'
}
architectury {
platformSetupLoomIde()
neoForge()
}
configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentNeoForge.extendsFrom common
// Files in this configuration will be bundled into your mod using the Shadow plugin.
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
repositories {
maven {
name = 'NeoForged'
url = 'https://maven.neoforged.net/releases'
}
}
dependencies {
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
}
processResources {
inputs.property 'version', project.version
filesMatching('META-INF/mods.toml') {
expand version: project.version
}
}
shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}
remapJar {
input.set shadowJar.archiveFile
}

View file

@ -0,0 +1 @@
loom.platform = neoforge

View file

@ -0,0 +1,12 @@
package com.axolotlmaid.optionsprofiles.neoforge;
import net.neoforged.fml.common.Mod;
import com.axolotlmaid.optionsprofiles.OptionsProfilesMod;
@Mod(OptionsProfilesMod.MOD_ID)
public final class OptionsProfilesModNeoForge {
public OptionsProfilesModNeoForge() {
OptionsProfilesMod.init();
}
}