Server policies#548
Conversation
MattSturgeon
left a comment
There was a problem hiding this comment.
Thanks for working on this!
As-is, there are a few build failures, open design questions, and a fragmented commit history.
For future reference, grouping commits logically by feature or unit of work (rather than per-file) makes changes much easier to review. Chris Beams' guide to commit messages is a great benchmark for this. On this repository, I also tend to use Conventional Commits, though that isn't a strict requirement.
To save you from having to go through tedious review cycles, I'm going to hold off on reviewing in more detail for now. This and #547 will serve as valuable reference implementations and inspiration when I have dedicated time to sit down and work on this feature.
I'll leave this open for now to keep it on the radar and allow you to iterate, if you choose. Thanks again for laying down the groundwork!
| //? if >=1.20.5 | ||
| ForgeServerPolicyNetworking.register(); |
There was a problem hiding this comment.
The newest Forge version we target is 1.19.4, so when gated behind >=1.20 this is currently a no-op
| @Override | ||
| public void onInitializeClient() { | ||
| ModConfig.setup(); | ||
| //? if >=1.20.5 |
There was a problem hiding this comment.
Can I ask why we're only targeting 1.20.5+? Are we using a packet type that was introduced in that version? Or maybe the FabricServerPolicyNetworking API was added in that version?
The server can now define a set of policies for freecam mod users, i.e disabling clipping or freecam entirely, much more fine-grained than #547 as you requested.
You can implement this now and then if you later want to make a server-side mod its as simple as doing this from the server:
Untested, especially the forge code.