aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/docs/content/en/features/mod-loaders.mdx
blob: d6fdf4f0e016d944bd6f9ac94c3ae7bf037201ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
---
title: Mod Loaders
description: Fabric and Forge installation and management
---

# Mod Loaders

DropOut supports the two most popular Minecraft mod loaders: Fabric and Forge. Both can be easily installed and managed directly from the launcher.

## Fabric Support

### Overview

Fabric is a lightweight, modular modding toolchain focused on:
- Fast updates to new Minecraft versions
- Clean, minimal API
- Strong developer community
- Excellent performance

### Installation

1. Navigate to **Versions** tab
2. Click **"Install Fabric"**
3. Select Minecraft version
4. Choose Fabric loader version
5. Click **"Install"**
6. Wait for installation to complete

### How It Works

**Meta API Integration:**
```rust
// Fetch available Fabric versions
let url = format!(
    "https://meta.fabricmc.net/v2/versions/loader/{}",
    minecraft_version
);
```

**Profile Generation:**
1. Fetch Fabric loader metadata
2. Download Fabric libraries
3. Generate version JSON with `inheritsFrom`
4. Merge with parent Minecraft version
5. Add to versions list

**Version Format:**
```json
{
  "id": "fabric-loader-0.15.0-1.20.4",
  "inheritsFrom": "1.20.4",
  "mainClass": "net.fabricmc.loader.impl.launch.knot.KnotClient",
  "libraries": [...]
}
```

### Fabric Versions

**Loader Versions:**
- Latest stable (recommended)
- Specific versions for compatibility
- Beta/snapshot versions

**Game Versions:**
- All Minecraft versions from 1.14+
- Snapshots supported
- Combat Test versions

### Library Management

Fabric libraries are resolved from Maven:

**Main Library:**
```
net.fabricmc:fabric-loader:0.15.0
```

**Dependencies:**
- `net.fabricmc:tiny-mappings-parser`
- `net.fabricmc:sponge-mixin`
- `net.fabricmc:access-widener`

**Download:**
```rust
// Maven resolution
let url = format!(
    "https://maven.fabricmc.net/{}/{}",
    artifact_path, filename
);
```

### Fabric API

Fabric Loader ≠ Fabric API:
- **Fabric Loader**: Mod loader (installed by DropOut)
- **Fabric API**: Library mod (download separately)

Many mods require Fabric API:
1. Download from [Modrinth](https://modrinth.com/mod/fabric-api) or [CurseForge](https://www.curseforge.com/minecraft/mc-mods/fabric-api)
2. Place in instance's `mods/` folder

## Forge Support

### Overview

Forge is the original and most popular Minecraft mod loader:
- Extensive mod ecosystem
- Mature API
- Wide version support
- Large community

### Installation

1. Navigate to **Versions** tab
2. Click **"Install Forge"**
3. Select Minecraft version
4. Choose Forge version
5. Click **"Install"**
6. Wait for installer to run
7. Installation complete

### How It Works

**Forge Installer:**
```rust
// Download Forge installer
let installer_url = format!(
    "https://maven.minecraftforge.net/net/minecraftforge/forge/{}/forge-{}-installer.jar",
    full_version, full_version
);

// Run installer
java -jar forge-installer.jar --installClient
```

**Profile Parsing:**
1. Forge installer creates version JSON
2. DropOut parses install profile
3. Extracts library dependencies
4. Processes processors (if any)
5. Generates launcher profile

**Version Format:**
```json
{
  "id": "1.20.4-forge-49.0.26",
  "inheritsFrom": "1.20.4",
  "mainClass": "cpw.mods.bootstraplauncher.BootstrapLauncher",
  "libraries": [...]
}
```

### Forge Versions

**Release Types:**
- **Latest**: Most recent stable
- **Recommended**: Most stable for production
- **Specific**: Version-locked for compatibility

**Minecraft Version Support:**
- Legacy versions (1.6.4+)
- Modern versions (1.13+)
- Latest versions (1.20+)

### Library Management

Forge has many libraries:

**Core Libraries:**
- `net.minecraftforge:forge:<version>`
- `net.minecraftforge:fmlloader:<version>`
- `org.ow2.asm:asm:<version>`

**Resolution:**
```rust
// Forge Maven
"https://maven.minecraftforge.net/"

// Dependencies may use:
// - Maven Central
// - Minecraft Libraries
```

### Forge Processors

Some Forge versions run "processors" during installation:
- Bytecode manipulation
- Library patching
- Mapping generation

DropOut handles these automatically.

## Version Inheritance

Both Fabric and Forge use Minecraft's inheritance system:

### Parent Version

```json
{
  "id": "fabric-loader-0.15.0-1.20.4",
  "inheritsFrom": "1.20.4"  // Parent vanilla version
}
```

### Merging Process

**Libraries:**
```rust
// Merged from both
parent_libraries + modded_libraries
// Duplicates removed
```

**Arguments:**
```rust
// Combined
parent_jvm_args + modded_jvm_args
parent_game_args + modded_game_args
```

**Assets:**
```rust
// Inherited from parent
assets = parent.assets
```

**Main Class:**
```rust
// Overridden by modded
main_class = modded.mainClass
```

## Comparison

| Feature | Fabric | Forge |
|---------|--------|-------|
| **Performance** | Excellent | Good |
| **Update Speed** | Very Fast | Moderate |
| **Mod Selection** | Growing | Extensive |
| **API Simplicity** | Simple | Complex |
| **Version Support** | 1.14+ | 1.6.4+ |
| **Developer Friendly** | Very | Moderate |
| **Stability** | Excellent | Excellent |

## Installing Mods

### Fabric Mods

1. Create/select instance
2. Ensure Fabric is installed
3. Download mods from:
   - [Modrinth](https://modrinth.com/)
   - [CurseForge](https://www.curseforge.com/)
   - [GitHub Releases](https://github.com/)
4. Place `.jar` files in `instances/<name>/mods/`
5. Launch game

**Compatibility:**
- Check Minecraft version
- Check Fabric Loader version
- Check for Fabric API requirement
- Read mod dependencies

### Forge Mods

1. Create/select instance
2. Ensure Forge is installed
3. Download mods from:
   - [CurseForge](https://www.curseforge.com/)
   - [Modrinth](https://modrinth.com/)
4. Place `.jar` files in `instances/<name>/mods/`
5. Launch game

**Compatibility:**
- Check Minecraft version exactly
- Check Forge version range
- Read mod dependencies
- Check for conflicts

## Troubleshooting

### Fabric Issues

**"Fabric Loader not found"**
- Reinstall Fabric
- Check version JSON exists
- Verify libraries downloaded

**"Mixin apply failed"**
- Mod incompatibility
- Remove conflicting mods
- Update Fabric Loader

**"Fabric API required"**
- Download Fabric API
- Match Minecraft version
- Place in mods folder

### Forge Issues

**"Forge installer failed"**
- Verify Java installation
- Check disk space
- Try older Forge version
- Check logs for details

**"Missing dependencies"**
- Install required mods
- Check mod version compatibility
- Read error message carefully

**"Class not found"**
- Forge version mismatch
- Reinstall Forge
- Verify libraries downloaded

### General Mod Issues

**Crash on Launch:**
1. Check crash report
2. Identify problematic mod
3. Remove or update mod
4. Test with minimal mods
5. Add mods back incrementally

**Performance Problems:**
1. Too many mods installed
2. Increase memory allocation
3. Install performance mods:
   - Fabric: Sodium, Lithium
   - Forge: OptiFine, Magnesium
4. Remove resource-heavy mods

## API Reference

### Tauri Commands

**Install Fabric:**
```typescript
await invoke('install_fabric', {
  minecraftVersion: '1.20.4',
  loaderVersion: '0.15.0'
});
```

**Install Forge:**
```typescript
await invoke('install_forge', {
  minecraftVersion: '1.20.4',
  forgeVersion: '49.0.26'
});
```

**List Fabric Versions:**
```typescript
const versions = await invoke('get_fabric_versions', {
  minecraftVersion: '1.20.4'
});
```

**List Forge Versions:**
```typescript
const versions = await invoke('get_forge_versions', {
  minecraftVersion: '1.20.4'
});
```

### Events

**Installation Progress:**
```typescript
listen('mod-loader-progress', (event) => {
  const { stage, percent } = event.payload;
  // Stages: "downloading", "installing", "processing", "complete"
});
```

## Best Practices

### For Players

1. **Choose one mod loader** per instance
2. **Match versions exactly** - Minecraft and loader
3. **Read mod requirements** before installing
4. **Start small** - Add mods incrementally
5. **Backup worlds** before adding mods
6. **Check compatibility** lists
7. **Update cautiously** - Test in separate instance

### For Modpack Creators

1. **Document versions** - MC, loader, all mods
2. **Test thoroughly** - All features
3. **List dependencies** - Including API
4. **Provide changelog** - For updates
5. **Version lock** - For stability
6. **Include configs** - Pre-configured
7. **Test updates** - Before release

## Future Features

- **Mod browser** - Install mods from launcher
- **Automatic updates** - Keep mods current
- **Dependency resolution** - Auto-install requirements
- **Conflict detection** - Warn about incompatibilities
- **Profile export** - Share modpack configurations
- **CurseForge integration** - Direct modpack import
- **Modrinth integration** - Mod search and install