Freecam icon indicating copy to clipboard operation
Freecam copied to clipboard

Enforce server configuration

Open 4Source opened this issue 3 months ago • 2 comments

Description of the feature

It would be nice to have the option to enforce the configuration which is given by the server.

Therefore the mod should also be installed in server an will only be responsible for sending Networking Configuration Tasks to the client. When a client connect to the server the client has to apply the configuration and enforce the usage.

Why is this useful?

This would be useful for server which want to allow freecam but not all of its freatures like flying through walls.

Freecam version

1.3.5

4Source avatar Dec 06 '25 00:12 4Source

To be cross-platform, we can't use Neoforge's Configuration Tasks API. But we can use vanilla Minecraft's LoginQueryPackets to do the same thing. That way, Neoforge client & Fabric server (or vice versa) can work as expected.

We will almost certainly need to refactor our internal representation of Freecam config, to allow us to track separately what the user has configured on disk, what rules, defaults, etc the server has defined, and the state of the final/merged configuration that Freecam should actually use.

I doubt I'll find time to work on this soon, but I'm definitely open to the idea.

MattSturgeon avatar Dec 06 '25 20:12 MattSturgeon

Sounds great I am looking forward to see this.

I thought about the structure of the configuration especially for the server. I think the server should be able to allow any value of the client and only for specified options enforce the server configuration.

Possible solution for allowing this:

  • Config entries optional: When in the config file the entries are optional then the server admin could write only the configuration which should be enforced.
  • List of values: For the server config file the config could be instead of a single value in an array of allowed values on the server this would make a fine-grained configuration file.

4Source avatar Dec 07 '25 08:12 4Source