Introduce test mod
This commit is contained in:
parent
cac291df47
commit
fed0392ddc
|
|
@ -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
|
||||
|
|
|
|||
26
fabric/testmod/build.gradle
Normal file
26
fabric/testmod/build.gradle
Normal 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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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!");
|
||||
}
|
||||
}
|
||||
22
fabric/testmod/src/main/resources/fabric.mod.json
Normal file
22
fabric/testmod/src/main/resources/fabric.mod.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user