FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
226 stars 194 forks source link

What is needed to connect to a local server using a client? #1011

Closed AlexeyAntivirus closed 7 months ago

AlexeyAntivirus commented 7 months ago

Hi there,

I have a question regarding mod development with fabric-loom. I downloaded a generated template, downloaded all assets, generated Minecraft source code and launched both Client and Server (via runClient and runServer respectively; they both ran successfully).

I tried to connect to a local server I ran via runServer using a client I ran via runClient, and I received an error message "Failed to log in: Invalid session". The reason is because i'm not authenticated. I tried to find in the documentation regarding how to configure a client via fabric-loom, so that I could provide my valid credentials, but no luck.

Is there any ways to give a client valid credentials via fabric-loom configuration? Or it is not supposed to do so?

Thank you in advance.

Juuxel commented 7 months ago

You need to set online-mode = false in the generated server.properties file in the run directory to disable account checking. (See more details on the MC Wiki if needed).

AlexeyAntivirus commented 7 months ago

That worked! Thanks for your help.