update template generator

This commit is contained in:
moehreag 2024-06-13 11:13:54 +02:00
parent 2b0bd27b1b
commit 698bc04da0
6 changed files with 15 additions and 11 deletions

View file

@ -1,6 +1,5 @@
plugins { plugins {
id("java") alias(libs.plugins.phytotelma)
id("dev.frogmc.phytotelma").version("$phytotelma_version")
} }
group = "$maven_group" group = "$maven_group"

View file

@ -1,11 +1,16 @@
[versions] [versions]
phytotelma = "$phytotelma_version"
minecraft = "$game_version" minecraft = "$game_version"
loader = "$loader_version" frogloader = "$loader_version"
froglib = "$froglib_version" froglib = "$froglib_version"
[libraries] [libraries]
# technically unused # technically unused
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
loader = { module = "dev.frogmc:frogloader", version.ref = "loader" } frogloader = { module = "dev.frogmc:frogloader", version.ref = "frogloader" }
froglib = { module = "dev.frogmc:froglib", version.ref = "froglib" } froglib = { module = "dev.frogmc:froglib", version.ref = "froglib" }
[plugins]
phytotelma = { id = "dev.frogmc.phytotelma", version.ref = "phytotelma" }

0
public/resources/template/gradlew.bat vendored Normal file → Executable file
View file

View file

@ -3,7 +3,7 @@ package $maven_group.$mod_id;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import dev.frogmc.froglib.entrypoints.MainExtension; import dev.frogmc.froglib.entrypoints.api.MainExtension;
import dev.frogmc.frogloader.api.mod.ModProperties; import dev.frogmc.frogloader.api.mod.ModProperties;
public class $mod_name_pascalMain implements MainExtension { public class $mod_name_pascalMain implements MainExtension {

View file

@ -3,6 +3,9 @@
"minVersion": "0.8", "minVersion": "0.8",
"package": "$maven_group.mixin", "package": "$maven_group.mixin",
"compatibilityLevel": "JAVA_21", "compatibilityLevel": "JAVA_21",
"mixins": [
],
"server": [ "server": [
], ],

View file

@ -194,13 +194,14 @@ outline: false
let java = main.folder("java") let java = main.folder("java")
let resources = main.folder("resources") let resources = main.folder("resources")
let classes = java let classes = java
for (let part of mavenGroupRef.value.split(/\\./g)) { for (let part of mavenGroupRef.value.split(".")) {
classes = classes.folder(part) classes = classes.folder(part)
} }
classes = classes.folder(modIdRef.value)
const classFileName = modNameRef.value.replaceAll(" ", "") const classFileName = modNameRef.value.replaceAll(" ", "")
promises.push( promises.push(
readAsset("/src/main/java/Main.java").then((data) => { readAsset("/src/main/java/Main.java").then((data) => {
classes.file(classFileName+"Main", data) classes.file(classFileName+"Main.java", data)
}) })
) )
promises.push( promises.push(
@ -253,10 +254,6 @@ outline: false
## Inputs ## Inputs
::: warning TODO
- Add froglib dependency to template
:::
<div id="inputs"> <div id="inputs">
<table> <table>
<tbody> <tbody>