Introduce test mod

This commit is contained in:
embeddedt 2023-08-09 20:07:59 -04:00
parent cac291df47
commit fed0392ddc
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
5 changed files with 67 additions and 3 deletions

View File

@ -11,7 +11,7 @@ dependencies {
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi("dev.latvian.mods:kubejs:${kubejs_version}") {
modCompileOnly("dev.latvian.mods:kubejs:${kubejs_version}") {
transitive = false
}
// Remove the next line if you don't want to depend on the API

View File

@ -0,0 +1,26 @@
apply plugin: "dev.architectury.loom"
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
if(rootProject.hasProperty("parchment_version")) {
parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
}
}
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modImplementation(fabricApi.module("fabric-resource-loader-v0", rootProject.fabric_api_version)) { exclude group: 'net.fabricmc', module: 'fabric-loader' }
implementation project(path: ":common", configuration: "namedElements")
implementation project(path: ":fabric", configuration: "namedElements")
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

View File

@ -0,0 +1,10 @@
package org.embeddedt.modernfix.testmod;
import net.fabricmc.api.ModInitializer;
public class TestMod implements ModInitializer {
@Override
public void onInitialize() {
System.out.println("Hello ModernFix world!");
}
}

View File

@ -0,0 +1,22 @@
{
"schemaVersion": 1,
"id": "mfix_testmod",
"version": "${version}",
"name": "ModernFix test mod",
"description": "Test mod used to validate features and behaviors of ModernFix, the essential Minecraft performance mod",
"authors": [
"embeddedt"
],
"contact": {
"sources": "https://github.com/embeddedt/ModernFix",
"homepage": "https://modrinth.com/mod/modernfix",
"issues": "https://github.com/embeddedt/ModernFix/issues"
},
"license": "LGPL-3.0",
"environment": "*",
"entrypoints": {
"main": [
"org.embeddedt.modernfix.testmod.TestMod"
]
}
}

View File

@ -10,8 +10,14 @@ pluginManagement {
include("test_agent")
include("common")
getProperty("enabled_platforms").tokenize(',').each { it ->
include(it.trim())
def current_platforms = getProperty("enabled_platforms").tokenize(',')
current_platforms.each { it ->
def platform_name = it.trim()
include(platform_name)
def testmodFolder = new File(platform_name + "/" + "testmod")
if(testmodFolder.isDirectory()) {
include(platform_name + ":testmod")
}
}
rootProject.name = 'modernfix'