nmdk
v1.0.1
Published
CLI tool for downloading and setting up Minecraft mod development kits (MDK) for Forge, Fabric, and NeoForge
Maintainers
Readme
MDK CLI Tool
A command-line tool for downloading and setting up Minecraft mod development kits (MDK) for Forge, Fabric, and NeoForge.
Installation
Global Installation
npm install -g nmdkUsing with npx (recommended)
npx mdk <modname> <mcversion> <loader> <loaderversion>Usage
Basic Syntax
mdk <modname> <mcversion> <loader> <loaderversion>Parameters
modname- Name of your mod projectmcversion- Minecraft version (e.g., 1.20.1, 1.19.2)loader- Mod loader (forge, fabric, neoforge)loaderversion- Loader version or "latest"
Examples
Forge Mod
# Create a Forge mod for Minecraft 1.20.1 with latest Forge
mdk mymod 1.20.1 forge latest
# Create a Forge mod with specific version
mdk coolmod 1.19.2 forge 43.2.0Fabric Mod
# Create a Fabric mod for Minecraft 1.20.1
mdk myfabricmod 1.20.1 fabric latest
# Create a Fabric mod with specific loader version
mdk testmod 1.19.2 fabric 0.14.21NeoForge Mod
# Create a NeoForge mod (Minecraft 1.20.1+ only)
mdk myneomod 1.20.1 neoforge latestFeatures
Automatic Setup
- Downloads the latest MDK for your chosen loader
- Extracts and organizes the project structure
- Cleans up Gradle files (removes comments, formats code)
- Updates mod metadata files
Interactive Configuration
The tool will prompt you for:
- Group ID (e.g., com.yourname.modname)
- Mod ID (lowercase, no spaces)
- Mod Name (display name)
- Author name
- Description
- Version
Additional Setup Options
- Run
gradlew setupDecompWorkspace(recommended for Forge/NeoForge) - Run
gradlew buildto test compilation - Open project in VS Code
Supported Loaders
Forge
- Website: https://files.minecraftforge.net/
- Supported MC Versions: 1.18.2, 1.19.2, 1.20.1+
- Latest Version Detection: Automatic via Forge API
Fabric
- Website: https://fabricmc.net/
- Supported MC Versions: 1.18.2, 1.19.2, 1.20.1+
- Latest Version Detection: Automatic via Fabric API
NeoForge
- Website: https://neoforged.net/
- Supported MC Versions: 1.20.1+ only
- Latest Version Detection: Automatic via Maven metadata
Project Structure
After running the tool, your project will have the standard MDK structure:
yourmod/
├── build.gradle
├── gradle.properties
├── settings.gradle
├── gradlew
├── gradlew.bat
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/yourname/yourmod/
│ │ │ └── YourMod.java
│ │ └── resources/
│ │ ├── META-INF/
│ │ │ └── mods.toml (Forge/NeoForge)
│ │ └── fabric.mod.json (Fabric)
│ └── test/
└── README.mdDevelopment Commands
Once your project is created, you can use these Gradle commands:
# Build your mod
./gradlew build
# Run Minecraft with your mod
./gradlew runClient
# Generate IDE run configurations
./gradlew genEclipseRuns # For Eclipse
./gradlew genIntellijRuns # For IntelliJ IDEA
# Setup development environment (Forge/NeoForge)
./gradlew setupDecompWorkspaceRequirements
- Node.js 14.0.0 or higher
- Java 17 or higher (for mod development)
- Internet connection (for downloading MDK)
Troubleshooting
Common Issues
"Directory already exists"
- The mod name you chose already exists as a directory
- Choose a different name or remove the existing directory
"No MDK found for version"
- The specified Minecraft version might not be supported by the loader
- Try a different version or check the loader's website
"NeoForge only supports Minecraft 1.20.1+"
- NeoForge is only available for Minecraft 1.20.1 and above
- Use Forge or Fabric for older versions
Gradle commands fail
- Make sure you have Java 17+ installed
- Check your internet connection
- Try running
./gradlew --versionto verify Gradle setup
Getting Help
If you encounter issues:
- Check that all parameters are correct
- Verify your Java version (
java -version) - Ensure you have a stable internet connection
- Try with a different mod name
License
MIT License - feel free to use this tool for your mod development projects!
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Changelog
v1.0.0
- Initial release
- Support for Forge, Fabric, and NeoForge
- Interactive configuration
- Automatic MDK download and setup
- Gradle file cleanup and formatting
