-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated Gradle to allow for multiloader support - Moved functioning code over to common directory - Moved from Cloth Config to Fzzy Config - Started setting up new configs - Renamed packages from `java.chronosacaria` to `java.dev.timefall` - Started adding more configurability for various artifacts
- Loading branch information
1 parent
9d2eae4
commit d812ff5
Showing
347 changed files
with
3,724 additions
and
2,684 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,83 @@ | ||
//file:noinspection GroovyAssignabilityCheck | ||
//file:noinspection GroovyAssignabilityCheck | ||
//file:noinspection GroovyAssignabilityCheck | ||
//file:noinspection GrUnresolvedAccess | ||
//file:noinspection GrUnresolvedAccess | ||
plugins { | ||
id 'fabric-loom' version '1.2-SNAPSHOT' | ||
id 'maven-publish' | ||
id "architectury-plugin" version "3.4-SNAPSHOT" | ||
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false | ||
id "me.modmuss50.mod-publish-plugin" version "0.3.4" apply false | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
archivesBaseName = project.archives_base_name | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
repositories { | ||
maven { url "https://maven.shedaniel.me/" } | ||
maven { url "https://maven.terraformersmc.com/"} | ||
architectury { | ||
minecraft = rootProject.minecraft_version | ||
} | ||
|
||
dependencies { | ||
//to change the versions see the gradle.properties file | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" | ||
subprojects { | ||
apply plugin: "dev.architectury.loom" | ||
apply plugin: "me.modmuss50.mod-publish-plugin" | ||
|
||
// Fabric API. This is technically optional, but you probably want it anyway. | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" | ||
base.archivesName = "${rootProject.archives_base_name}-${project.name}" | ||
|
||
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { | ||
exclude(group: "net.fabricmc.fabric-api") | ||
dependencies { | ||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" | ||
// The following line declares the mojmap mappings, you may use other mappings as well | ||
// mappings loom.officialMojangMappings() | ||
// The following line declares the yarn mappings you may select this one as well. | ||
if (project.name != "neoforge") { | ||
mappings "net.fabricmc:yarn:${rootProject.minecraft_version}+build.${rootProject.yarn_mappings}:v2" | ||
} | ||
} | ||
|
||
} | ||
processResources { | ||
inputs.property "version", project.version | ||
//if (project.name != "common") { | ||
// publishMods { | ||
// file = remapJar.archiveFile | ||
// changelog = file('../CHANGELOG.md').text | ||
// type = project.mod_version.contains("alpha") ? ALPHA : | ||
// project.mod_version.contains("beta") ? BETA : STABLE | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
} | ||
// modrinth { | ||
// accessToken = providers.environmentVariable("MODRINTH_API_KEY") | ||
// projectId = "xweQBqAC" | ||
// minecraftVersions.add(rootProject.minecraft_version) | ||
// } | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
it.options.release = 17 | ||
// curseforge { | ||
// accessToken = providers.environmentVariable("CURSEFORGE_API_KEY") | ||
// projectId = "476788" | ||
// minecraftVersions.add(rootProject.minecraft_version) | ||
// } | ||
// } | ||
//} | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
} | ||
allprojects { | ||
apply plugin: "java" | ||
apply plugin: "architectury-plugin" | ||
apply plugin: "maven-publish" | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
} | ||
} | ||
version = "${rootProject.mod_version}+mc${rootProject.minecraft_version}" | ||
group = rootProject.maven_group | ||
|
||
// configure the maven publication | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
repositories { | ||
maven { | ||
name = "TerraformersMC" | ||
url = "https://maven.terraformersmc.com/" | ||
} | ||
maven { | ||
name = "QuiltMC" | ||
url = "https://maven.quiltmc.org/repository/release/" | ||
} | ||
maven { | ||
name = "Modrinth" | ||
url = "https://api.modrinth.com/maven" | ||
content { | ||
includeGroup "maven.modrinth" | ||
} | ||
} | ||
} | ||
|
||
// 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. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = "UTF-8" | ||
options.release = 21 | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
architectury { | ||
common(rootProject.enabled_platforms.split(",")) | ||
} | ||
|
||
|
||
dependencies { | ||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies | ||
// Do NOT use other classes from fabric loader | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" | ||
|
||
//modCompileOnly "dev.emi:emi-xplat-intermediary:${rootProject.emi_version}+${rootProject.minecraft_version}" | ||
modImplementation "maven.modrinth:fzzy-config:${rootProject.fzzyConfigVersion}" | ||
modImplementation("net.fabricmc:fabric-language-kotlin:1.12.1+kotlin.2.0.20") | ||
|
||
|
||
} | ||
|
||
publishing { | ||
publications { | ||
mavenCommon(MavenPublication) { | ||
artifactId = rootProject.archives_base_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. | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package dev.timefall.mcdar; | ||
|
||
import dev.timefall.mcdar.registries.ArtifactsRegistry; | ||
import dev.timefall.mcdar.registries.ItemGroupRegistry; | ||
import dev.timefall.mcdar.registries.StatusEffectRegistry; | ||
import dev.timefall.mcdar.registries.SummonedEntityAttributeRegistry; | ||
|
||
public class McdarCommon { | ||
|
||
public static void initialize() { | ||
//CONFIG = AutoConfig.getConfigHolder(McdarConfig.class).getConfig(); | ||
ArtifactsRegistry.register(); | ||
ItemGroupRegistry.register(); | ||
//EnchantsRegistry.register(); | ||
StatusEffectRegistry.register(); | ||
SummonedEntityAttributeRegistry.register(); | ||
//SummonedEntityRegistry.register(); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package dev.timefall.mcdar; | ||
|
||
import net.minecraft.item.ItemGroup; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.util.Identifier; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
public class ModConstants { | ||
|
||
public static final String MOD_ID = "mcdar"; | ||
public static Identifier ID (String path){ | ||
return Identifier.of(MOD_ID, path); | ||
} | ||
public static final RegistryKey<ItemGroup> ARTIFACTS = RegistryKey.of(RegistryKeys.ITEM_GROUP, ModConstants.ID("artifacts")); | ||
|
||
public static final Logger LOGGER = LogManager.getLogger(MOD_ID); | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.