Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Fabric Support #120

Open
1 task done
ahdg6 opened this issue Jan 12, 2022 · 5 comments
Open
1 task done

[Feature Request]: Fabric Support #120

ahdg6 opened this issue Jan 12, 2022 · 5 comments
Labels
feature New feature or request good-first-issue A task ideal for a new contributor to work on
Milestone

Comments

@ahdg6
Copy link
Contributor

ahdg6 commented Jan 12, 2022

I have confirmed that ...

  • There is no duplicate feature request.

Description

As Forge is being replaced by Fabric in modern Minecraft version, Supporting Sponge may not worth the efforts(Only for 1.16.5 and later, 1.12.2 is good but it can't run with Java11).
In that case, a Fabric support may suit for LibertyBans future development.
I haven't seen any punishment plugin for Fabric and It would be awesome to see LibertyBans to be the first one.

Some Lib that may help you:
Adventure
Cloud - Cross Platform Command framework

@ahdg6 ahdg6 added the feature New feature or request label Jan 12, 2022
@A248 A248 added this to the 1.0.2 milestone Jan 12, 2022
@A248
Copy link
Owner

A248 commented Jan 12, 2022

If a platform uses the Adventure API, it isn't much work to add support for it. LibertyBans already uses the Adventure library, so if Fabric uses Adventure too, the Fabric implementation will be easy to create.

Sponge 8 uses Adventure as well. As I understand it, Fabric and Sponge are worthy competitors, having comparable quality of API. So, it would be just to support both of them in LibertyBans (If it were the case that Fabric had an API as under-specified as BungeeCord's, then I would be less willing to support Fabric, but I doubt this).

@A248
Copy link
Owner

A248 commented Jan 18, 2022

To become more acquainted with Fabric I started to investigate the matter. However, because LibertyBans uses Maven as its build system, and Fabric effectively requires mods to use Gradle, it is not likely I will be able to add Fabric support.

It is an astronomical task to switch LibertyBans from Maven to Gradle. Despite Maven's status as the most common build tool in the Java ecosystem, the Fabric toolchain does not support Maven. So, Fabric support will not arrive but after a very long time or after a very significant effort.

It is possible we could embed a miniature Gradle build inside a larger Maven build. However, this does not work very well: I have done the opposite (Maven inside of Gradle) before. It is very messy and redundant. Gradle and Maven are not simply not intended to run inside of each other.


Why Fabric Requires Gradle

Rather than defining its own API which encapsulates the Minecraft server, Fabric exposes classes from the Minecraft server directly.

The Minecraft classes are proprietary, so Fabric cannot distribute them. To work around this, Fabric mods must generate the Minecraft classes during the build. (To use an analogy: It's as if each Fabric mod must run its own copy of SpigotMC's BuildTools)

Fabric has created a Gradle plugin to do this. Because the Fabric toolchain depends on Gradle, the documentation is exclusively focused on Gradle and describes examples for Gradle. They do not even mention Maven. It is simply assumed that modders use Gradle.

This presents 3 alternatives for LibertyBans:

  1. Convert our entire build to use Gradle. This is an astronomical task, although it can be done; we can reach the stars if we dedicate ourselves to the effort. See also #68
  2. Rewrite the Fabric build toolchain so that all the tooling supports Maven. This would require a vast undertaking.
  3. Embed a Gradle build inside the larger Maven build. Gradle would handle the Fabric mod while Maven would handle the rest of the LibertyBans build.

@A248 A248 closed this as completed Jan 18, 2022
@A248 A248 removed this from the 1.0.2 milestone Jan 18, 2022
@ahdg6
Copy link
Contributor Author

ahdg6 commented Jan 18, 2022

oh. What a pity.
Anyway, Thank you for your efforts in investigating.

@BlueTree242
Copy link
Contributor

Ill work to make this a gradle project, never leave fabric behind A2, its an important software

@A248
Copy link
Owner

A248 commented Jul 24, 2023

Fabric support is still possible, although it may require a downstream consumer of the LibertyBans project to depend on the core modules and bundle a plugin via Gradle. This isn't hard to accomplish although perhaps it could be placed in a new repository. Someone else could maintain the Fabric platform of LibertyBans if they wanted to.

@A248 A248 reopened this Jul 24, 2023
@A248 A248 added the good-first-issue A task ideal for a new contributor to work on label Jul 24, 2023
@A248 A248 added this to the 1.1.1 milestone Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good-first-issue A task ideal for a new contributor to work on
Projects
None yet
Development

No branches or pull requests

3 participants