@bobschlowinskii/clicraft 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,427 @@
1
+ ---
2
+ layout: default
3
+ title: launch
4
+ parent: Commands
5
+ nav_order: 5
6
+ description: "Launch your Minecraft instance"
7
+ permalink: /commands/launch
8
+ ---
9
+
10
+ # launch Command
11
+
12
+ Launch your Minecraft instance directly from the command line.
13
+
14
+ ## 📝 Synopsis
15
+
16
+ ```bash
17
+ clicraft launch [options]
18
+ ```
19
+
20
+ ## 📖 Description
21
+
22
+ The `launch` command starts your Minecraft instance with all the correct Java arguments, libraries, and configurations. It handles:
23
+
24
+ - Java classpath setup
25
+ - Native library extraction
26
+ - JVM arguments configuration
27
+ - Game arguments setup
28
+ - Authentication (online mode)
29
+ - Offline mode support
30
+
31
+ ## 🎯 Options
32
+
33
+ | Option | Description | Default |
34
+ |--------|-------------|---------|
35
+ | `-i, --instance <path>` | Path to instance directory | Current directory |
36
+ | `--offline` | Launch in offline mode (no authentication) | false |
37
+ | `--verbose` | Show detailed launch information | false |
38
+
39
+ ## 📋 Examples
40
+
41
+ ### Launch from instance directory
42
+ ```bash
43
+ cd my-instance
44
+ clicraft launch
45
+ ```
46
+
47
+ ### Launch with instance path
48
+ ```bash
49
+ clicraft launch --instance ./my-instance
50
+ ```
51
+
52
+ ### Launch in offline mode
53
+ ```bash
54
+ clicraft launch --offline
55
+ ```
56
+ No authentication required - useful for testing or single-player.
57
+
58
+ ### Verbose launch
59
+ ```bash
60
+ clicraft launch --verbose
61
+ ```
62
+ See detailed Java command and debugging information.
63
+
64
+ ### Launch specific instance
65
+ ```bash
66
+ clicraft launch --instance ~/minecraft/modded-fabric
67
+ ```
68
+
69
+ ## 🎮 Example Session
70
+
71
+ ### Online Mode (Default)
72
+ ```bash
73
+ $ cd my-instance
74
+ $ clicraft launch
75
+
76
+ Preparing to launch Minecraft...
77
+ ✓ Instance detected: my-modded-world
78
+ ✓ Minecraft version: 1.21.1
79
+ ✓ Mod loader: Fabric 0.16.5
80
+ ✓ Authentication: Player123
81
+ ✓ Mods found: 5
82
+
83
+ Launching Minecraft...
84
+ [Minecraft window opens]
85
+ ```
86
+
87
+ ### Offline Mode
88
+ ```bash
89
+ $ clicraft launch --offline
90
+
91
+ Preparing to launch Minecraft...
92
+ ✓ Instance detected: my-instance
93
+ ✓ Minecraft version: 1.21.1
94
+ ✓ Mod loader: Fabric 0.16.5
95
+ ✓ Mode: Offline
96
+ ✓ Username: Player
97
+
98
+ Launching Minecraft...
99
+ [Minecraft window opens]
100
+ ```
101
+
102
+ ## 🔍 Launch Process
103
+
104
+ ### What Happens
105
+
106
+ 1. **Instance Detection**: Finds and validates `mcconfig.json`
107
+ 2. **Authentication Check**: Verifies login status (unless `--offline`)
108
+ 3. **Library Preparation**: Prepares Java libraries and native files
109
+ 4. **JVM Setup**: Configures Java Virtual Machine arguments
110
+ 5. **Game Launch**: Executes Java with Minecraft
111
+ 6. **Monitor**: Keeps running to show game output
112
+
113
+ ### Verbose Output
114
+
115
+ With `--verbose`, you'll see:
116
+ ```bash
117
+ $ clicraft launch --verbose
118
+
119
+ Instance: ./my-instance
120
+ Minecraft Version: 1.21.1
121
+ Loader: fabric-loader-0.16.5-1.21.1
122
+ Authentication: Player123 (uuid: 123e...)
123
+
124
+ Java Command:
125
+ java -Xmx2G -Xms2G \
126
+ -Djava.library.path=./natives \
127
+ -cp ./libraries/*.jar:./versions/1.21.1.jar \
128
+ net.fabricmc.loader.impl.launch.knot.KnotClient \
129
+ --username Player123 \
130
+ --uuid 123e4567... \
131
+ --accessToken xxx \
132
+ --version 1.21.1
133
+
134
+ [Game output follows]
135
+ ```
136
+
137
+ ## 🎯 Use Cases
138
+
139
+ ### Regular Gameplay
140
+ ```bash
141
+ # Login first (one-time)
142
+ clicraft login
143
+
144
+ # Launch whenever you want to play
145
+ cd my-instance
146
+ clicraft launch
147
+ ```
148
+
149
+ ### Testing Mods Offline
150
+ ```bash
151
+ # Install mods
152
+ clicraft install sodium
153
+ clicraft install lithium
154
+
155
+ # Test in offline mode
156
+ clicraft launch --offline
157
+ ```
158
+
159
+ ### Multiple Instances
160
+ ```bash
161
+ # Launch different instances
162
+ clicraft launch --instance ./vanilla
163
+ clicraft launch --instance ./modded
164
+ clicraft launch --instance ./testing
165
+ ```
166
+
167
+ ### Server Launch
168
+ ```bash
169
+ cd my-server-instance
170
+ clicraft launch
171
+
172
+ # Server starts and runs in the terminal
173
+ ```
174
+
175
+ ### Development Testing
176
+ ```bash
177
+ # Quick offline testing
178
+ clicraft install my-mod --force
179
+ clicraft launch --offline --verbose
180
+ ```
181
+
182
+ ## 🖥️ System Requirements
183
+
184
+ ### Java
185
+ - **Required**: Java 21 or higher
186
+ - **Recommended**: Latest Java version
187
+ - **Memory**: At least 4GB RAM available
188
+
189
+ Verify Java:
190
+ ```bash
191
+ java --version
192
+ ```
193
+
194
+ ### Display (Client Only)
195
+ - Graphics drivers installed
196
+ - Display server running (X11/Wayland on Linux)
197
+ - Monitor connected
198
+
199
+ ## ⚙️ Configuration
200
+
201
+ Launch behavior is configured in `mcconfig.json`:
202
+
203
+ ```json
204
+ {
205
+ "name": "my-instance",
206
+ "type": "client",
207
+ "minecraftVersion": "1.21.1",
208
+ "loader": "fabric",
209
+ "loaderVersion": "0.16.5",
210
+ "javaPath": "java",
211
+ "jvmArgs": ["-Xmx2G", "-Xms2G"]
212
+ }
213
+ ```
214
+
215
+ ### Customizing JVM Arguments
216
+
217
+ Edit `mcconfig.json` to customize Java settings:
218
+
219
+ ```json
220
+ {
221
+ "jvmArgs": [
222
+ "-Xmx4G", // Maximum memory (4GB)
223
+ "-Xms4G", // Initial memory (4GB)
224
+ "-XX:+UseG1GC", // Use G1 garbage collector
225
+ "-XX:+UnlockExperimentalVMOptions",
226
+ "-XX:G1NewSizePercent=20",
227
+ "-XX:G1ReservePercent=20",
228
+ "-XX:MaxGCPauseMillis=50",
229
+ "-XX:G1HeapRegionSize=32M"
230
+ ]
231
+ }
232
+ ```
233
+
234
+ ### Memory Recommendations
235
+
236
+ | Instance Type | Recommended Memory |
237
+ |---------------|-------------------|
238
+ | Vanilla | 2GB (`-Xmx2G`) |
239
+ | Light mods | 3GB (`-Xmx3G`) |
240
+ | Heavy mods | 4-6GB (`-Xmx4G`) |
241
+ | Modpacks | 6-8GB (`-Xmx6G`) |
242
+ | Servers | 4-8GB+ depending on players |
243
+
244
+ ## 🌐 Online vs Offline
245
+
246
+ ### Online Mode (Default)
247
+ Requires `clicraft login`:
248
+ - ✅ Multiplayer servers
249
+ - ✅ Realms
250
+ - ✅ Custom skins
251
+ - ✅ Official servers
252
+ - ✅ Account verification
253
+
254
+ ### Offline Mode (`--offline`)
255
+ No login required:
256
+ - ✅ Single-player
257
+ - ✅ LAN play
258
+ - ✅ Mod testing
259
+ - ❌ Online multiplayer
260
+ - ❌ Custom skins
261
+ - ❌ Realms
262
+
263
+ ## 📊 Game Output
264
+
265
+ The command shows Minecraft's output:
266
+
267
+ ```
268
+ [00:00:01] [main/INFO]: Loading Minecraft 1.21.1 with Fabric Loader 0.16.5
269
+ [00:00:02] [main/INFO]: Loading 5 mods
270
+ [00:00:02] [main/INFO]: - sodium 0.6.0
271
+ [00:00:02] [main/INFO]: - lithium 0.12.0
272
+ [00:00:03] [main/INFO]: Minecraft loaded successfully
273
+ ```
274
+
275
+ Exit codes:
276
+ - `0` - Normal exit
277
+ - `1` - Crash or error
278
+ - `130` - Terminated by user (Ctrl+C)
279
+
280
+ ## ⚠️ Common Issues
281
+
282
+ ### "Instance not found"
283
+ Make sure you're in an instance directory or using `--instance`:
284
+ ```bash
285
+ # Check for mcconfig.json
286
+ ls mcconfig.json
287
+
288
+ # Or specify instance
289
+ clicraft launch --instance ./my-instance
290
+ ```
291
+
292
+ ### "Not logged in"
293
+ Login required for online mode:
294
+ ```bash
295
+ clicraft login
296
+ clicraft launch
297
+ ```
298
+
299
+ Or use offline mode:
300
+ ```bash
301
+ clicraft launch --offline
302
+ ```
303
+
304
+ ### "Java not found"
305
+ Install Java 21 or higher:
306
+ ```bash
307
+ # Verify Java installation
308
+ java --version
309
+
310
+ # If not installed, download from:
311
+ # https://adoptium.net/
312
+ ```
313
+
314
+ ### "Out of memory"
315
+ Increase memory allocation in `mcconfig.json`:
316
+ ```json
317
+ {
318
+ "jvmArgs": ["-Xmx4G", "-Xms4G"]
319
+ }
320
+ ```
321
+
322
+ ### "Native library error"
323
+ On Linux, you may need:
324
+ ```bash
325
+ sudo apt-get install libglfw3 libglfw3-dev
326
+ ```
327
+
328
+ ### Game Crashes
329
+ Check the logs:
330
+ ```bash
331
+ cd my-instance
332
+ ls logs/
333
+ cat logs/latest.log
334
+ ```
335
+
336
+ ## 🎮 Server Hosting
337
+
338
+ ### Starting a Server
339
+ ```bash
340
+ cd my-server-instance
341
+ clicraft launch
342
+
343
+ # Server starts and shows:
344
+ [Server] Starting Minecraft server on *:25565
345
+ [Server] Done! Server is running
346
+ ```
347
+
348
+ ### Server Commands
349
+ Type commands in the terminal:
350
+ ```
351
+ > stop # Stop the server
352
+ > list # List players
353
+ > op username # Make someone an operator
354
+ ```
355
+
356
+ ### Background Server
357
+ Run server in background:
358
+ ```bash
359
+ nohup clicraft launch > server.log 2>&1 &
360
+ ```
361
+
362
+ View logs:
363
+ ```bash
364
+ tail -f server.log
365
+ ```
366
+
367
+ Stop server:
368
+ ```bash
369
+ # Type 'stop' in server console or:
370
+ kill $(pgrep -f "minecraft.*server")
371
+ ```
372
+
373
+ ## 💡 Pro Tips
374
+
375
+ 1. **Login Once**: Authentication persists, no need to login every launch
376
+ 2. **Check Status**: Use `clicraft status` before launching
377
+ 3. **Test Offline**: Use `--offline` for quick mod testing
378
+ 4. **Allocate Memory**: Give Minecraft enough RAM for smooth gameplay
379
+ 5. **Close Other Apps**: Close memory-heavy apps before launching
380
+ 6. **Use Verbose**: Use `--verbose` for troubleshooting launch issues
381
+ 7. **Multiple Instances**: Launch different instances for different play styles
382
+
383
+ ## 🔧 Performance Tips
384
+
385
+ ### Optimize JVM Arguments
386
+ ```json
387
+ {
388
+ "jvmArgs": [
389
+ "-Xmx4G",
390
+ "-Xms4G",
391
+ "-XX:+UseG1GC",
392
+ "-XX:+UnlockExperimentalVMOptions",
393
+ "-XX:G1NewSizePercent=20",
394
+ "-XX:G1ReservePercent=20",
395
+ "-XX:MaxGCPauseMillis=50"
396
+ ]
397
+ }
398
+ ```
399
+
400
+ ### Install Performance Mods
401
+ ```bash
402
+ clicraft install sodium # Rendering
403
+ clicraft install lithium # General
404
+ clicraft install starlight # Lighting
405
+ clicraft install ferritecore # Memory
406
+ ```
407
+
408
+ ### Monitor Performance
409
+ Use `--verbose` to see Java command and diagnose issues.
410
+
411
+ ## 📚 Related Commands
412
+
413
+ - [`clicraft create`](create.md) - Create an instance to launch
414
+ - [`clicraft login`](login.md) - Login for online play
415
+ - [`clicraft install`](install.md) - Install mods before launching
416
+ - [`clicraft info`](info.md) - View instance information
417
+
418
+ ## 🔗 See Also
419
+
420
+ - [Commands Overview](../commands.md)
421
+ - [Configuration Guide](../configuration.md)
422
+ - [Login Command](login.md)
423
+ - [Info Command](info.md)
424
+
425
+ ---
426
+
427
+ [← Back to Commands](../commands.md) | [Next: info →](info.md)
@@ -0,0 +1,276 @@
1
+ ---
2
+ layout: default
3
+ title: search
4
+ parent: Commands
5
+ nav_order: 2
6
+ description: "Search for mods on Modrinth"
7
+ permalink: /commands/search
8
+ ---
9
+
10
+ # search Command
11
+
12
+ Search for Minecraft mods on Modrinth with powerful filtering options.
13
+
14
+ ## 📝 Synopsis
15
+
16
+ ```bash
17
+ clicraft search <query> [options]
18
+ ```
19
+
20
+ ## 📖 Description
21
+
22
+ The `search` command queries the Modrinth API to find mods matching your search criteria. You can filter results by Minecraft version, mod loader, and limit the number of results displayed.
23
+
24
+ Modrinth is a popular open-source mod hosting platform with a large collection of high-quality Minecraft mods.
25
+
26
+ ## 🎯 Arguments
27
+
28
+ | Argument | Description | Required |
29
+ |----------|-------------|----------|
30
+ | `<query>` | Search query text | Yes |
31
+
32
+ ## 🎯 Options
33
+
34
+ | Option | Description | Default |
35
+ |--------|-------------|---------|
36
+ | `-l, --limit <number>` | Number of results to show | 10 |
37
+ | `-v, --version <version>` | Filter by Minecraft version | None |
38
+ | `--loader <loader>` | Filter by mod loader | None |
39
+ | `--verbose` | Enable verbose output | false |
40
+
41
+ ### Supported Loaders
42
+ - `fabric` - Fabric mods
43
+ - `forge` - Forge mods
44
+ - `quilt` - Quilt mods
45
+ - `neoforge` - NeoForge mods
46
+
47
+ ## 📋 Examples
48
+
49
+ ### Basic search
50
+ ```bash
51
+ clicraft search sodium
52
+ ```
53
+ Searches for mods matching "sodium" and displays up to 10 results.
54
+
55
+ ### Search with version filter
56
+ ```bash
57
+ clicraft search shader --version 1.21.1
58
+ ```
59
+ Find shader mods compatible with Minecraft 1.21.1.
60
+
61
+ ### Search with loader filter
62
+ ```bash
63
+ clicraft search optimization --loader fabric
64
+ ```
65
+ Find optimization mods for the Fabric mod loader.
66
+
67
+ ### Combined filters
68
+ ```bash
69
+ clicraft search "performance" --version 1.20.1 --loader fabric --limit 20
70
+ ```
71
+ Find up to 20 performance mods for Fabric on Minecraft 1.20.1.
72
+
73
+ ### Multi-word search
74
+ ```bash
75
+ clicraft search "world generation"
76
+ ```
77
+ Search for mods related to world generation (use quotes for multi-word queries).
78
+
79
+ ### Limit results
80
+ ```bash
81
+ clicraft search minimap --limit 5
82
+ ```
83
+ Show only the top 5 results for minimap mods.
84
+
85
+ ## 💡 Output Format
86
+
87
+ The search results display:
88
+
89
+ ```
90
+ Found 50 mods matching "sodium"
91
+
92
+ 1. Sodium
93
+ A modern rendering engine for Minecraft which greatly improves performance
94
+ Author: CaffeineMC
95
+ Downloads: 50.2M
96
+ Updated: 2024-01-15
97
+ ID: AANobbMI
98
+
99
+ 2. Sodium Extra
100
+ Extra features for Sodium
101
+ Author: FlashyReese
102
+ Downloads: 5.1M
103
+ Updated: 2024-01-12
104
+ ID: PtjYWJkn
105
+
106
+ ...
107
+ ```
108
+
109
+ Each result shows:
110
+ - **Name** - The mod's display name
111
+ - **Description** - Short description of what the mod does
112
+ - **Author** - The mod creator
113
+ - **Downloads** - Total download count
114
+ - **Updated** - Last update date
115
+ - **ID** - Modrinth project ID (used for installation)
116
+
117
+ ## 🎮 Example Session
118
+
119
+ ```bash
120
+ $ clicraft search sodium --version 1.21.1 --loader fabric
121
+
122
+ Searching Modrinth for "sodium"...
123
+
124
+ Found 3 mods matching "sodium"
125
+
126
+ 1. Sodium
127
+ A modern rendering engine for Minecraft
128
+ Author: CaffeineMC
129
+ Downloads: 50.2M
130
+ Updated: 2024-01-15
131
+ ID: AANobbMI
132
+
133
+ 2. Sodium Extra
134
+ Adds additional options to Sodium
135
+ Author: FlashyReese
136
+ Downloads: 5.1M
137
+ Updated: 2024-01-12
138
+ ID: PtjYWJkn
139
+
140
+ 3. Reese's Sodium Options
141
+ Alternative options menu for Sodium
142
+ Author: FlashyReese
143
+ Downloads: 3.2M
144
+ Updated: 2024-01-10
145
+ ID: Bh37bMuy
146
+
147
+ To install a mod, use: clicraft install <mod-name-or-id>
148
+ ```
149
+
150
+ ## 🎯 Use Cases
151
+
152
+ ### Finding Popular Optimization Mods
153
+ ```bash
154
+ clicraft search optimization --limit 10 --loader fabric
155
+ ```
156
+
157
+ ### Searching for Specific Mod
158
+ ```bash
159
+ clicraft search "just enough items"
160
+ ```
161
+
162
+ ### Discovering New Mods
163
+ ```bash
164
+ clicraft search decoration --version 1.20.1 --limit 25
165
+ ```
166
+
167
+ ### Checking Mod Availability
168
+ ```bash
169
+ clicraft search "iris shaders" --version 1.21.1 --loader fabric
170
+ ```
171
+
172
+ ## 🔍 Search Tips
173
+
174
+ ### Use Specific Terms
175
+ Instead of searching "better", try:
176
+ - "performance"
177
+ - "optimization"
178
+ - "quality of life"
179
+ - "world generation"
180
+
181
+ ### Filter by Version
182
+ Always include `--version` when searching for mods for a specific Minecraft version:
183
+ ```bash
184
+ clicraft search minimap --version 1.20.1
185
+ ```
186
+
187
+ ### Filter by Loader
188
+ If you know your instance's mod loader, filter by it:
189
+ ```bash
190
+ clicraft search sodium --loader fabric
191
+ ```
192
+
193
+ ### Adjust Result Limits
194
+ - Use `--limit 5` for quick searches
195
+ - Use `--limit 50` for comprehensive browsing
196
+
197
+ ### Exact Mod Names
198
+ For well-known mods, use their exact name:
199
+ ```bash
200
+ clicraft search "optifine"
201
+ clicraft search "sodium"
202
+ clicraft search "lithium"
203
+ ```
204
+
205
+ ## ⚠️ Common Issues
206
+
207
+ ### No Results Found
208
+ If your search returns no results:
209
+ - Check your spelling
210
+ - Try broader search terms
211
+ - Remove version/loader filters
212
+ - Try searching on [Modrinth.com](https://modrinth.com) directly
213
+
214
+ ### Network Errors
215
+ If you see "Failed to fetch from Modrinth":
216
+ - Check your internet connection
217
+ - Modrinth may be temporarily down
218
+ - Try again in a few moments
219
+
220
+ ### Too Many Results
221
+ If you get too many results:
222
+ - Add more specific search terms
223
+ - Use `--version` and `--loader` filters
224
+ - Reduce `--limit` to see top results only
225
+
226
+ ## 💡 Pro Tips
227
+
228
+ 1. **Save Mod IDs**: Note down the mod ID from search results for easy installation
229
+ 2. **Version Compatibility**: Always filter by your Minecraft version when building a mod pack
230
+ 3. **Loader Consistency**: Stick to one mod loader (Fabric or Forge) for compatibility
231
+ 4. **Popular Mods First**: Search results are sorted by relevance and popularity
232
+ 5. **Dependencies**: Some mods require other mods - check descriptions carefully
233
+
234
+ ## 📚 Related Commands
235
+
236
+ - [`clicraft install`](install.md) - Install a mod from search results
237
+ - [`clicraft info`](info.md) - View installed mods in your instance
238
+ - [`clicraft upgrade`](upgrade.md) - Update installed mods
239
+
240
+ ## 🔗 Installing from Search Results
241
+
242
+ After finding a mod with `search`, install it using either:
243
+
244
+ ```bash
245
+ # Using mod name
246
+ clicraft install sodium
247
+
248
+ # Using Modrinth ID
249
+ clicraft install AANobbMI
250
+ ```
251
+
252
+ ## 📖 API Information
253
+
254
+ The search command uses the [Modrinth API](https://docs.modrinth.com/api-spec) to fetch mod information. Results are fetched in real-time from Modrinth's servers.
255
+
256
+ ## 🆘 Troubleshooting
257
+
258
+ ### "API rate limit exceeded"
259
+ Modrinth has rate limits. Wait a few minutes before searching again.
260
+
261
+ ### "Invalid loader specified"
262
+ Valid loaders are: `fabric`, `forge`, `quilt`, `neoforge`. Check your spelling.
263
+
264
+ ### "Invalid version format"
265
+ Minecraft versions should be in format like: `1.21.1`, `1.20.1`, `1.19.2`
266
+
267
+ ## 🔗 See Also
268
+
269
+ - [Commands Overview](../commands.md)
270
+ - [Install Command](install.md)
271
+ - [Upgrade Command](upgrade.md)
272
+ - [Modrinth Website](https://modrinth.com)
273
+
274
+ ---
275
+
276
+ [← Back to Commands](../commands.md) | [Next: install →](install.md)