User: joe Date: 17 Apr 25 11:15 Revision: 2f12b8aab6034680514902dceeb1b003dfdef2ad Summary: Update templates repo TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=9932&personal=false Index: templates/bukkit/build.gradle.ft =================================================================== --- templates/bukkit/build.gradle.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/bukkit/build.gradle.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -38,7 +38,7 @@ // Configure the Minecraft version for our task. // This is the only required configuration besides applying the plugin. // Your plugin's jar (or shadowJar if present) will be used automatically. - minecraftVersion(${API_VERSION}) + minecraftVersion("${API_VERSION}") } } Index: templates/bukkit/build.gradle.kts.ft =================================================================== --- templates/bukkit/build.gradle.kts.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/bukkit/build.gradle.kts.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -37,7 +37,7 @@ // Configure the Minecraft version for our task. // This is the only required configuration besides applying the plugin. // Your plugin's jar (or shadowJar if present) will be used automatically. - minecraftVersion(${API_VERSION}) + minecraftVersion("${API_VERSION}") } } Index: templates/bukkit/paper.mcdev.template.json =================================================================== --- templates/bukkit/paper.mcdev.template.json (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/bukkit/paper.mcdev.template.json (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -28,6 +28,7 @@ "type": "semantic_version", "forceDropdown": true, "options": [ + "1.21.5", "1.21.4", "1.21.3", "1.21.1", Index: templates/fabric/.mcdev.template.json =================================================================== --- templates/fabric/.mcdev.template.json (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/fabric/.mcdev.template.json (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -49,6 +49,15 @@ "default": true }, { + "name": "USE_DATAGEN", + "type": "boolean", + "default": true, + "visible": { + "dependsOn": ["VERSIONS"], + "condition": "$VERSIONS.useFabricApi" + } + }, + { "name": "SPLIT_SOURCES", "type": "boolean", "default": true, @@ -223,6 +232,18 @@ "openInEditor": true }, { + "template": "DataGenerator.java.ft", + "destination": "src/${CLIENT_SOURCE_SET}/java/${MAIN_CLASS.packagePath}/client/${MAIN_CLASS.className}DataGenerator.java", + "condition": "$LANGUAGE == 'Java' && $USE_DATAGEN", + "openInEditor": true + }, + { + "template": "DataGenerator.kt.ft", + "destination": "src/${CLIENT_SOURCE_SET}/kotlin/${MAIN_CLASS.packagePath}/client/${MAIN_CLASS.className}DataGenerator.kt", + "condition": "$LANGUAGE == 'Kotlin' && $USE_DATAGEN", + "openInEditor": true + }, + { "template": "../licenses/${LICENSE.id}.txt.ft", "destination": "LICENSE.txt" } Index: templates/fabric/DataGenerator.java.ft =================================================================== --- templates/fabric/DataGenerator.java.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) +++ templates/fabric/DataGenerator.java.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -0,0 +1,12 @@ +package ${MAIN_CLASS.packageName}.client; + +import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; +import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; + +public class ${MAIN_CLASS.className}DataGenerator implements DataGeneratorEntrypoint { + + @Override + public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { + FabricDataGenerator.Pack pack = fabricDataGenerator.createPack(); + } +} Index: templates/fabric/DataGenerator.kt.ft =================================================================== --- templates/fabric/DataGenerator.kt.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) +++ templates/fabric/DataGenerator.kt.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -0,0 +1,11 @@ +package ${MAIN_CLASS.packageName}.client + +import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint +import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator + +class ${MAIN_CLASS.className}DataGenerator : DataGeneratorEntrypoint { + + override fun onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { + val pack = fabricDataGenerator.createPack(); + } +} Index: templates/fabric/build.gradle.ft =================================================================== --- templates/fabric/build.gradle.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/fabric/build.gradle.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -23,6 +23,14 @@ } #end +#if ($USE_DATAGEN) +fabricApi { + configureDataGeneration { + client = true + } +} +#end + repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because Index: templates/fabric/build.gradle.kts.ft =================================================================== --- templates/fabric/build.gradle.kts.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/fabric/build.gradle.kts.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -36,6 +36,14 @@ } #end +#if ($USE_DATAGEN) +fabricApi { + configureDataGeneration { + client = true + } +} +#end + repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because Index: templates/fabric/fabric.mod.json.ft =================================================================== --- templates/fabric/fabric.mod.json.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/fabric/fabric.mod.json.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -14,6 +14,9 @@ "environment": "${MOD_ENVIRONMENT}", "entrypoints": { +#if ($USE_DATAGEN) + "fabric-datagen": ["${MAIN_CLASS.packageName}.client.${MAIN_CLASS.className}DataGenerator"], +#end #if (${MOD_ENVIRONMENT} != 'server') "client": ["${MAIN_CLASS.packageName}.client.${MAIN_CLASS.className}Client"], #end Index: templates/fabric/velocity_implicit.vm =================================================================== --- templates/fabric/velocity_implicit.vm (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/fabric/velocity_implicit.vm (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -9,6 +9,7 @@ #* @vtlvariable name="KOTLIN_LOADER_VERSION" type="com.demonwav.mcdev.util.SemanticVersion" *# #* @vtlvariable name="MOD_ENVIRONMENT" type="java.lang.String" *# #* @vtlvariable name="USE_MIXINS" type="boolean" *# +#* @vtlvariable name="USE_DATAGEN" type="boolean" *# #* @vtlvariable name="SPLIT_SOURCES" type="boolean" *# #* @vtlvariable name="CLIENT_SOURCE_SET" type="java.lang.String" *# #* @vtlvariable name="MOD_ID" type="java.lang.String" *# Index: templates/messages.properties =================================================================== --- templates/messages.properties (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/messages.properties (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -29,6 +29,7 @@ platform.sponge.label=Sponge platform.velocity.label=Velocity +creator.ui.use_datagen.label=Use Datagen: creator.ui.use_paper_manifest.label=Use Paper Manifest: creator.ui.use_paper_manifest.warning=Paper plugins are still experimental, their usage is discouraged for general purpose development. Index: templates/velocity/build.gradle.ft =================================================================== --- templates/velocity/build.gradle.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/velocity/build.gradle.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -30,7 +30,7 @@ // Configure the Velocity version for our task. // This is the only required configuration besides applying the plugin. // Your plugin's jar (or shadowJar if present) will be used automatically. - velocityVersion(${VELOCITY_VERSION}) + velocityVersion("${VELOCITY_VERSION}") } } Index: templates/velocity/build.gradle.kts.ft =================================================================== --- templates/velocity/build.gradle.kts.ft (revision 9e08a525a4aca214c2186b5916787ad06c74299b) +++ templates/velocity/build.gradle.kts.ft (revision 2f12b8aab6034680514902dceeb1b003dfdef2ad) @@ -34,7 +34,7 @@ // Configure the Velocity version for our task. // This is the only required configuration besides applying the plugin. // Your plugin's jar (or shadowJar if present) will be used automatically. - velocityVersion(${VELOCITY_VERSION}) + velocityVersion("${VELOCITY_VERSION}") } }