Server policies - #548
Server policies#548personalized-advertising wants to merge 23 commits into
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. |
|
Hi @MattSturgeon, |
I completely get the frustration here, especially since this has been sitting in the backlog for a long time. The short answer is yes: the plan is to implement this over the next few Freecam release cycles. I'm hesitant to promise a specific date because my open-source backlog is always shifting, but it is definitely on my radar.
I’m really sorry I missed your email. I get a lot of emails and things easily slip through the cracks. For Freecam, the most reliable way to get eyes on a topic is always to use the issue tracker or discussions. If you want to follow the progress on this specific feature, #546 and #105 are the main threads.
I haven't started active development yet, but I've been thinking through the architecture. I am always open to reviewing PRs, and I'm happy to accept a well-executed contribution that aligns with our roadmap:
To be clear, the high-level approach in this PR—using a JSON payload over a plugin channel—is actually on the right track and gets the core idea right. There are some details I'd nitpick, but fundamentally it's blocked by unresolved merge conflicts, CI failures, a fragmented git history, and a lack of testing. It also only targets 1.20.5+; a feature like this would ideally support all Minecraft versions Freecam targets. If someone wants to pick this back up and iron out those mechanical hurdles, I'm more than happy to review it. That said, because getting a PR across the finish line takes real effort, I'd suggest dropping a note in the relevant issues first before diving into code, just to make sure we're aligned on the details. |
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.