neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://projects.neoforged.net/neoforged/neoforge
Other
1.22k stars 178 forks source link

Make dedicated servers set `online-mode=false` by default in dev #695

Closed Shadows-of-Fire closed 6 months ago

Shadows-of-Fire commented 8 months ago

This can be done by patching public final boolean onlineMode = this.get("online-mode", true); in DedicatedServerProperties to use !IS_RUNNING_IN_IDE instead of always defaulting to true.

marchermans commented 8 months ago

Alternatively we are considering adding a log in mechanism to neogradle on the client

TelepathicGrunt commented 6 months ago

Having this online mode set to false by default would be extremely great. I keep forgetting to set it. I like having my dev dedicated server not actually being online too so I would just keep setting it to false, even with a log-in mechanism available.

KnightMiner commented 6 months ago

Does neo currently automatically accept the server eula for you? IIRC it did not in the past. The fact I have to both accept the eula and set online mode to false led me to just create a folder with both those properties and whatever other "server defaults" I want that I copy into all my dev environments.

Shadows-of-Fire commented 6 months ago

Yes https://github.com/neoforged/NeoForge/blob/8dd9e1803f5b163f12b85db4f3a152860197b795/patches/net/minecraft/server/Eula.java.patch#L8