#is it possible to make client join the server on minecraft start? like quickplay thingy?
22 messages · Page 1 of 1 (latest)
through a mod?
yes
im developing a mod and i want to develop something similar so i need to learn the basics, basically
look at how quickplay works then
cant i do like in mod, client.connect etc?
quickplay works with a program argument
thats what chat gpt gives me but its not working
`import net.fabricmc.api.ModInitializer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.packet.s2c.play.ConnectedToServerS2CPacket;
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
public class AutoConnectMod implements ModInitializer {
private static final String SERVER_ADDRESS = "yourserver.example.com";
private static final int SERVER_PORT = 25565; // Değiştirin
@Override
public void onInitialize() {
// Mod başlatıldığında sunucuya bağlanma işlemi yapılacak.
MinecraftClient client = MinecraftClient.getInstance();
client.execute(() -> {
ClientPlayNetworkHandler networkHandler = client.getNetworkHandler();
if (networkHandler != null) {
ClientConnection connection = new ClientConnection();
networkHandler.connect(SERVER_ADDRESS, SERVER_PORT);
}
});
}
}
`
i'm not reading llm code 
see how the game connects to servers from the multiplayer screen
then use that
what they're trying to say is that you may want to read the vanilla code as they do not know every detail of how the game works
i gave you the best answer i have. look at how minecraft already does it
how can i look or read that code
GPT not gonna give you a working code. Be ready. It's gonna take legacy, Bukkit or random pseudo code most of the time
i know i just started coding like 5 days ago
im trying to learn
KaupenJoe YouTuber have video about that