-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
22 lines (18 loc) · 934 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const Launcher = require('./components/launcher');
const launcher = new Launcher();
// State the options with which you are going to release a version of Minecraft
const launchOptions = {
username: 'Fae34r', // Enter your username
version: '1.8', // Enter the version
gameDirectory: './minecraft', // Enter the directory where you have downloaded Minecraft
memory: {
// Define the memory you want to use
min: '2G', // Minimum memory
max: '5G', // Maximum memory
},
java: 'C:/Program Files/Java/jdk-17/bin/java.exe', // Exact location of java.exe file (OPTIONAL)
java8: 'C:/Program Files/Java/jre-1.8/bin/java.exe', // Exact location of the java.exe v8 file (OPTIONAL)
};
// Adding a message before launching Minecraft
console.log(`Launching Minecraft version ${launchOptions.version} for user ${launchOptions.username}...`);
launcher.launch(launchOptions); // Starts Minecraft with the declared options.