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!
| @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?
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
FabricServerPolicyNetworkingAPI was added in that version?
its because its based on the newer payload format where it has payload type etc.
The mod making new releases for unsupported versions does complicate things a bit, can I ask why there are releases for 1.17 etc? For modded players who want to use old versions can they not just use the older freecam releases from when that version was relevant?
You should look at "Files changed" as a whole, as I implemented the code in an IDE but then copied over the changes file by file using github's built in editor, its a clunky workflow but works for one-off PRs like these. Also that is my bad, I will remove the forge code. Also yes this PR can be iterated on by you hopefully it serves as a good starting point, from my side I am just a server developer who wants better compatibility so longer term back and forth for this PR isn't ideal for my as I am already stretched across many projects, hope you understand. |
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.