Exopandora / ShoulderSurfing

Shoulder Surfing Reloaded is a highly configurable third person camera mod for minecraft.
MIT License
48 stars 9 forks source link

[FEATURE] [1.18.2] Requirements for someone to do a Fabric port #76

Closed Waterpicker closed 1 year ago

Waterpicker commented 2 years ago

First off, I'm aware you don't want to want to port the mod to fabric yourself. I'm wanting to port itself. I'm asking for any requirements or preferences you have for how a third party port works. You know basic stuff to prevent users from getting confused.

Exopandora commented 2 years ago

Im happy that you are willing to try to port shoulder surfing to fabric! Technically this mod is licensed under MIT so you can do what you want. As far as i am concerned i would like a fabric mod to have feature partity with the forge versions. The only major problem is that in order to achieve full feature partity you would need to reimplement forges config system. To prevent user confusion i would suggest that we keep the code in one repository (this one) and just make a new branch (like 1.18.2-fabric). You could then make pull requests whenever you want something to be pushed or i could add you as a member to the project. As far as publishing goes i would also add you as a memeber to the curseforge project but the problem is that the original owner bougar never migrated his account and i do not have the rights to add new members, so i would have to upload new releases to curseforge. On a sidenote: I did some refactoring literally two days ago (but did not push it) in order to clean up the codebase a little bit and in fact simplify the hurdle for a fabric port. I can also help you out if needed.

Fuzss commented 1 year ago

Hey there, just quickly weighing in on this as I wanted to ask you about helping out with a Fabric port anyways.

Jared has recently demonstrated this incredible Multiloader Gradle Setup which allows for developing a single mod for multiple mod loaders (even Quilt if you want) at the same time while sharing most of the code. When mod loader specific code is necessary Java's Service Provider Interface's are used. There are no dependencies, the whole thing is pure Gradle, that's what makes it really great. And everything can remain within your own hands, so no need to rely on someone else to maintain a port with feature parity.

For config parity I made this library which ports the whole Forge config system to Fabric, everything down to the package names is exactly the same. I'm using this in all of my own projects, and some other devs have also begun to make use of this library. It's especially great to use in such a multiloader setup, as the library can already be applied to the common sub project, so only registering the configs is where loader specific code actually has to be used, it's very neat! This would only be a dependency for the Fabric version, nothing on the Forge version would change, still zero dependencies for that one.

I've recently helped someone port their mod to Forge using this setup, feel free to take a look since it shows a lot more applications and features than the template linked above: https://github.com/Fuzss/impactfulweather/tree/multiloader

My own projects also use this setup, although they are much more dependent on my personal setup and have a lot of extra stuff, but still feel free to take a look: Puzzles Lib (my library, that handles a bunch of abstractions so that actual mods have to use loader specific code much more rarely), Universal Bone Meal (just an example of a mod with some actual content)

If you want to use such a multiloader setup I'd be more than happy to implement it for you and make a PR similar to the Impactful Weather mod linked above, just tell me.

So to recap, that would mean still no dependencies for Forge, and Fabric would simply depend on Forge Config API Port (and probably Fabric API).

IMS212 commented 1 year ago

I've ported the entirety of Shoulder Surfing to Fabric as a test, will likely post on GitHub soon.

IMS212 commented 1 year ago

Done in #79.

Exopandora commented 1 year ago

So I finally got some time to work on this and decided to finally port this to fabric (forge will still be supported).

I really like the MultiLoader setup and am currently working to restructure the project for it. The fabric port will most likely use the config library mod @Fuzss mentioned (thanks for the suggestion).

So far, I haven't taken a look at the pull request yet, but i really appreciate the effort you put into it.

Exopandora commented 1 year ago

The port to fabric has been done. Thanks for the help and suggestions!