mirror of
https://github.com/darksaid98/draggable_lists.git
synced 2026-12-03 06:28:46 +00:00
feat: 1.20.6 - 1.21 neoforge support
This commit is contained in:
10 files changed
+43
-40
No files matched your search
@@ -0,0 +1,91 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://maven.neoforged.net/releases/" }
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
neoForge()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentNeoforge.extendsFrom common
|
||||
}
|
||||
|
||||
dependencies {
|
||||
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
|
||||
// Remove the next line if you don't want to depend on the API
|
||||
modApi "dev.architectury:architectury-neoforge:${rootProject.architectury_version}"
|
||||
|
||||
modApi "me.shedaniel.cloth:cloth-config-neoforge:${rootProject.cloth_config_version}"
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("META-INF/neoforge.mods.toml") {
|
||||
expand "version": project.version,
|
||||
"description": rootProject.mod_description,
|
||||
"minecraft_version": rootProject.minecraft_version,
|
||||
"architectury_version": rootProject.architectury_version,
|
||||
"cloth_config_version": rootProject.cloth_config_version
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
exclude "fabric.mod.json"
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
def commonSources = project(":common").sourcesJar
|
||||
dependsOn commonSources
|
||||
from commonSources.archiveFile.map { zipTree(it) }
|
||||
}
|
||||
|
||||
components.java {
|
||||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenNeoforge(MavenPublication) {
|
||||
artifactId = rootProject.archives_base_name + "-" + project.name
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
loom.platform=neoforge
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mrmelon54.DraggableLists.neoforge;
|
||||
|
||||
import com.mrmelon54.DraggableLists.DraggableLists;
|
||||
import net.neoforged.fml.ModLoadingContext;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.loading.FMLEnvironment;
|
||||
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
|
||||
|
||||
@Mod(DraggableLists.MOD_ID)
|
||||
public class DraggableListsNeoforge {
|
||||
public DraggableListsNeoforge() {
|
||||
if (!FMLEnvironment.dist.isClient())
|
||||
return;
|
||||
|
||||
ModLoadingContext.get().registerExtensionPoint(IConfigScreenFactory.class, () -> (client, parent) -> DraggableLists.createConfigScreen(parent).get());
|
||||
DraggableLists.init();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "*"
|
||||
issueTrackerURL = "https://github.com/mrmelon54/draggable_lists/issues"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[[mods]]
|
||||
modId = "draggable_lists"
|
||||
version = "${version}"
|
||||
displayName = "Draggable Lists"
|
||||
authors = "MrMelon54"
|
||||
description = "${description}"
|
||||
logoFile = "/icon.png"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "${minecraft_version}"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "architectury"
|
||||
mandatory = true
|
||||
versionRange = "[${architectury_version},)"
|
||||
ordering = "AFTER"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "cloth_config"
|
||||
mandatory = true
|
||||
versionRange = "[${cloth_config_version},)"
|
||||
ordering = "AFTER"
|
||||
side = "BOTH"
|
||||
|
||||
[[mixins]]
|
||||
config = "draggable_lists-common.mixins.json"
|
||||
|
||||
[[mixins]]
|
||||
config = "draggable_lists.mixins.json"
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.mrmelon54.DraggableLists.mixin.neoforge",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"minVersion": "0.8",
|
||||
"client": [
|
||||
],
|
||||
"mixins": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "Draggable Lists",
|
||||
"pack_format": 15
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user