mirror of
https://github.com/darksaid98/draggable_lists.git
synced 2026-12-03 22:16:14 +00:00
First commit and add config options
This commit is contained in:
45 files changed
+1533
No files matched your search
@@ -0,0 +1,91 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
}
|
||||
|
||||
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
|
||||
developmentFabric.extendsFrom common
|
||||
}
|
||||
|
||||
dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||
// Remove the next line if you don't want to depend on the API
|
||||
modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}"
|
||||
|
||||
modApi("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
modApi("com.terraformersmc:modmenu:${rootProject.modmenu_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||
common(project(path: ":fabric-like", configuration: "namedElements")) { transitive false }
|
||||
shadowCommon(project(path: ":fabric-like", configuration: "transformProductionFabric")) { transitive false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
def commonSources = project(":common").sourcesJar
|
||||
dependsOn commonSources
|
||||
from commonSources.archiveFile.map { zipTree(it) }
|
||||
}
|
||||
|
||||
components.java {
|
||||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenFabric(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,11 @@
|
||||
package com.mrmelon54.Draggable.fabric;
|
||||
|
||||
import com.mrmelon54.Draggable.fabriclike.DraggableFabricLike;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
public class DraggableFabric implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
DraggableFabricLike.init();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mrmelon54.Draggable.fabric;
|
||||
|
||||
import com.mrmelon54.Draggable.ExampleExpectPlatform;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class ExampleExpectPlatformImpl {
|
||||
/**
|
||||
* This is our actual method to {@link ExampleExpectPlatform#getConfigDirectory()}.
|
||||
*/
|
||||
public static Path getConfigDirectory() {
|
||||
return FabricLoader.getInstance().getConfigDir();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.mrmelon54.Draggable.mixin.fabric",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"minVersion": "0.8",
|
||||
"client": [
|
||||
],
|
||||
"mixins": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "draggable",
|
||||
"version": "${version}",
|
||||
"name": "Draggable",
|
||||
"description": "Draggable resource packs, datapacks, servers and worlds",
|
||||
"authors": [
|
||||
"MrMelon54"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://mrmelon54.com/minecraft/draggable",
|
||||
"sources": "https://github.com/MrMelon54/draggable",
|
||||
"issues": "https://github.com/MrMelon54/draggable/issues"
|
||||
},
|
||||
"license": "GPL-3.0-only",
|
||||
"icon": "icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.mrmelon54.Draggable.fabric.DraggableFabric"
|
||||
],
|
||||
"modmenu": [
|
||||
"com.mrmelon54.Draggable.fabriclike.ModMenuIntegration"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"draggable.mixins.json",
|
||||
"draggable-common.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabric": "*",
|
||||
"minecraft": ">=1.20",
|
||||
"architectury": ">=9.0.0"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user