Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ the latest Minecraft version.
Example:\
`mkmod -name "Example Mod" examplemod me.jxsnack.example ExampleMod`

**With extensions**\
If you want to add an extension, for example the Create Addon template extension, you can use the `-extension`
parameter.

Example:\
`mkmod -name "Example Mod" -extension "create-addon" examplemod me.jxsnack.example ExampleMod`

---

If you want to change platform or version, first make sure mkmod supports it. If it doesn't, but you want it to support
Expand Down
10 changes: 9 additions & 1 deletion fabric/1.21.3/files/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
plugins {
id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
:: plugins ::
}

version = project.mod_version
group = project.maven_group
:: top ::

base {
archivesName = project.archives_base_name
:: base ::
}

repositories {
Expand All @@ -16,10 +19,12 @@ repositories {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
:: repositories ::
}

fabricApi {
configureDataGeneration()
:: fabricApi ::
}

dependencies {
Expand All @@ -30,7 +35,7 @@ dependencies {

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

:: dependencies ::
}

processResources {
Expand All @@ -53,12 +58,14 @@ java {

sourceCompatibility = JavaVersion.VERSION_%mkmod:javaVersion%
targetCompatibility = JavaVersion.VERSION_%mkmod:javaVersion%
:: java ::
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
:: jar ::
}

// configure the maven publication
Expand All @@ -76,5 +83,6 @@ publishing {
// 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.
:: publishing-repositories ::
}
}
5 changes: 4 additions & 1 deletion fabric/1.21.3/files/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ org.gradle.parallel=true
minecraft_version=%mkmod:version%
yarn_mappings=%mkmod:version%+%mkmod:yarn%
loader_version=%mkmod:loader%
:: loader ::

# Mod Properties
mod_version=1.0.0
maven_group=%mkmod:package%
archives_base_name=%mkmod:id%
:: properties ::

# Dependencies
fabric_version=%mkmod:fabricApi%+%mkmod:version%
fabric_version=%mkmod:fabricApi%+%mkmod:version%
:: dependencies ::
4 changes: 4 additions & 0 deletions fabric/1.21.3/files/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package %mkmod:package%;

import net.fabricmc.api.ModInitializer;
:: imports ::

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -12,6 +13,7 @@ public class %mkmod:main% implements ModInitializer {
// It is considered best practice to use your mod id as the logger's name.
// That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
:: TOP ::

@Override
public void onInitialize() {
Expand All @@ -20,5 +22,7 @@ public void onInitialize() {
// Proceed with mild caution.

LOGGER.info("Hello Fabric world!");
:: init ::
}
:: TAIL ::
}
5 changes: 4 additions & 1 deletion fabric/1.21.3/files/java/MainDataGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
:: imports ::

public class %mkmod:main%DataGenerator implements DataGeneratorEntrypoint {
:: TOP ::
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {

:: init ::
}
:: TAIL ::
}
2 changes: 1 addition & 1 deletion update.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"latest": "1.1.2"
"latest": "1.2.0"
}