I came across this post looking for an answer to the OP's question. My use case is a classroom with one server in LAN and many clients of course participants that want to test their mods.
The answer is:
On the client
Edit build.gradle. In the section client add the following line before the closing curly brace: args '--username', '<YOUR NAME>'. Replace <YOUR NAME> with your actual username. E.g. if your username is lmoellendorf the client section should look like this:
client {
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', mod_id
args '--username', 'lmoellendorf'
}
Make sure that each username is unique on your server.
Start your Minecraft Client. Click Multiplayer then Direct Conection. Here enter the Server address which is the local IP of your server followed by colon : followed by the default port 25565. E.g. if your server's IP is 192.168.0.7 the entry should look like this:
192.168.0.7:25565
Be sure that in run/server.properties the line online-mode is set to false:
online-mode=false
By
lmoellendorf ·