create Command

Create a new Minecraft instance with your choice of mod loader (Fabric or Forge).

๐Ÿ“ Synopsis

clicraft create [options]

๐Ÿ“– Description

The create command guides you through an interactive process to set up a new Minecraft instance. It will:

  1. Prompt you for instance configuration (name, type, loader, versions)
  2. Download the Minecraft client or server files
  3. Download the selected mod loader (Fabric or Forge)
  4. Download all required libraries and dependencies
  5. Download game assets (for client instances)
  6. Set up the directory structure
  7. Generate configuration files

Creating from Existing Config

If you run clicraft create in a directory containing an mcconfig.json file, CLIcraft will automatically:

  1. Detect the existing configuration
  2. Display the config details for confirmation
  3. Prompt for a new instance name
  4. Create the instance with the same Minecraft version, mod loader, and loader version
  5. Install all mods from the configuration
  6. Apply game settings (if present in the config)

This is perfect for sharing modpack configurations or replicating setups across machines.

๐ŸŽฏ Options

Option Description
--verbose Enable verbose output to see detailed progress
--force, -f Overwrites existing instance folder if necessary
--path, -p <path> Specifies path in which to install instance

๐Ÿ’ก Interactive Prompts

When you run clicraft create, youโ€™ll be prompted for:

1. Instance Name

The name for your instance directory. This will be used as the folder name.

  • Must be a valid directory name
  • Should be descriptive (e.g., โ€œvanilla-1.21โ€, โ€œmodded-fabric-latestโ€)

2. Instance Type

Choose between:

  • Client - For playing Minecraft yourself
  • Server - For hosting a multiplayer server

3. Mod Loader

Choose your mod loader:

  • Fabric - Lightweight, fast, modern mod loader
  • Forge - Traditional, widely-supported mod loader

4. Minecraft Version

Select the Minecraft version you want to use. Common choices:

  • Latest release (e.g., 1.21.1)
  • Stable versions with good mod support (e.g., 1.20.1, 1.19.2)
  • Specific version for mod compatibility

5. Loader Version

Choose the version of your selected mod loader:

  • Latest version (recommended for most users)
  • Specific version for compatibility

๐Ÿ“‚ Instance Structure

After creation, your instance will have this structure:

my-instance/
โ”œโ”€โ”€ mcconfig.json      # Instance configuration
โ”œโ”€โ”€ launch.sh          # Generated launch script (reference)
โ”œโ”€โ”€ assets/            # Game assets (sounds, textures, etc.)
โ”œโ”€โ”€ libraries/         # Java libraries and dependencies
โ”œโ”€โ”€ mods/              # Installed mods (empty initially)
โ”œโ”€โ”€ natives/           # Native libraries (platform-specific)
โ”œโ”€โ”€ versions/          # Version JARs and JSON metadata
โ”œโ”€โ”€ saves/             # World saves (created when you play)
โ”œโ”€โ”€ resourcepacks/     # Resource packs
โ””โ”€โ”€ logs/              # Game logs

๐Ÿ“‹ Examples

Basic usage

clicraft create

Then follow the interactive prompts.

Verbose output

clicraft create --verbose

See detailed progress as files are downloaded and configured.

๐ŸŽฎ Example Session

$ clicraft create

? Enter instance name: my-modded-world
? Select instance type: Client
? Select mod loader: Fabric
? Select Minecraft version: 1.21.1
? Select Fabric version: 0.16.5

Creating instance my-modded-world...
โœ“ Downloading Minecraft 1.21.1...
โœ“ Downloading Fabric loader 0.16.5...
โœ“ Downloading libraries...
โœ“ Downloading assets...
โœ“ Creating directory structure...
โœ“ Writing configuration...

Instance created successfully at: ./my-modded-world

Next steps:
  cd my-modded-world
  clicraft login              # Login to Microsoft account
  clicraft install <mod>      # Install mods
  clicraft launch             # Launch the game

๐Ÿ” What Happens Behind the Scenes

  1. Manifest Download: Fetches the Minecraft version manifest from Mojang
  2. Version Selection: Downloads specific version metadata
  3. Loader Setup: Downloads and configures Fabric or Forge
  4. Library Resolution: Downloads all required Java libraries
  5. Asset Download: Fetches game assets (textures, sounds, language files)
  6. Native Libraries: Downloads platform-specific native libraries
  7. Configuration: Creates mcconfig.json with all instance settings

โš™๏ธ Configuration File

The created mcconfig.json contains:

{
  "name": "my-instance",
  "type": "client",
  "loader": "fabric",
  "minecraftVersion": "1.21.1",
  "loaderVersion": "0.16.5",
  "javaPath": "java",
  "jvmArgs": ["-Xmx2G", "-Xms2G"]
}

You can manually edit this file to customize Java settings and other configurations.

๐ŸŽฏ Use Cases

Development Environment

# Create a clean testing environment
clicraft create
# Name: mod-testing
# Type: Client
# Loader: Fabric
# Version: Latest

Server Setup

# Create a multiplayer server
clicraft create
# Name: survival-server
# Type: Server
# Loader: Forge
# Version: 1.20.1

Multiple Instances

# Create separate instances for different mod packs
clicraft create  # vanilla-survival
clicraft create  # tech-mods
clicraft create  # creative-building

Create from Shared Config

# Someone shared their mcconfig.json with you
mkdir my-new-instance
cd my-new-instance
cp ~/Downloads/mcconfig.json .

# Create instance from the config
clicraft create
# CLIcraft detects the config and offers to create from it

Clone an Existing Instance

# Copy just the config (not the whole instance)
cp my-instance/mcconfig.json ~/new-instance-config/
cd ~/new-instance-config/

# Create a fresh instance with same mods and settings
clicraft create

โš ๏ธ Common Issues

Download Failures

If downloads fail:

  • Check your internet connection
  • Try again - downloads will resume from where they left off
  • Use --verbose to see detailed error messages

Disk Space

Creating an instance requires:

  • Client: ~500MB - 2GB depending on version
  • Server: ~50MB - 500MB depending on version

Make sure you have sufficient disk space available.

Java Version

Ensure you have Java 21 or higher installed:

java --version

๐Ÿ†˜ Troubleshooting

โ€œFailed to download Minecraft version manifestโ€

This usually indicates a network issue. Check your internet connection and try again.

โ€œUnsupported Minecraft versionโ€

The version you selected may not be supported by the chosen mod loader. Try:

  • A more recent version
  • Checking the mod loaderโ€™s supported versions

Permission Errors

On Linux/macOS, ensure you have write permissions in the current directory:

ls -la

After creating an instance:

๐Ÿ”— See Also



Back to top

Copyright © 2024 theinfamousben. Distributed under the ISC license.

This site uses Just the Docs, a documentation theme for Jekyll.