简体   繁体   中英

minecraft custom launcher, how to skip main menu and go directly into game world

I want to make my own custom launcher for minecraft, where player selects single player mode or multiplayer mode inside launcher instead of game main menu. And when player launches minecraft, it goes directly into game world without showing the main menu.

How could I achieve this kind of function? I am new to minecraft development, but I have experience with java programming. Should I use bukkit to make this happen? Or use forge to create a mod?

Many thanks in advance.

It's not possible to join a singleplayer world directly just from a launcher (without changing game code through the launcher).

However, the game does accept an argument to connect to a server upon joining; you can do this by passing a --server <server> and --port <port> argument when launching the jar. If those arguments are present then the game will connect to that server rather than displaying the main menu. To actually make use of those arguments you'll need to have written the rest of your launcher, since the game only launches when you can give those parameters.

This is a fairly difficult task to begin with...
First of all minecraft is structured in a way that the game (minecraft) is separed from the launcher so you would need some communication between your custom launcher and the game.
So the best solution that I can think of is to create a mod that attaches to the game and reads something external like a file (created by the launcher) which has the data to launch directly or not the game.
Bukkit is a completely different thing because it works on the server side of minecraft (multiplayer) and it doesn't affect the launch of the game at all.

Anyways this isn't the best place to talk about minecraft mods, there are specialized forums like Forge forums that could help you a lot better than what I can do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM