-
Notifications
You must be signed in to change notification settings - Fork 76
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
Rewrite #26
Rewrite #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preamble
Just a few things before I get into the review:
-
This template is open source, it is meant to be forked and changed to each author's liking, if you don't like how I am doing something in this template, then please fork it, make your changes and build your mod off your fork.
-
My lack of comment on any specific change does not indicate approval of said change, there are a lot of changes here that I am not a fan of, but the only comment I can add to them is "I don't like this", which I don't feel is conductive.
-
I know the template needs some love, it is hard finding time to update it, I'll try and find time after the 1.20 port, or when ForgeGradle works on Gradle 8.
-
I did not look at anything regarding quilt. This template is meant to provide a quick and easy way for you to write code once, and use it on multiple modloaders without having to maintain multiple repositories or branches. So with that in mind, adding quilt seems like it deviates from the purpose of this template, as quilt likes to point out very often, nearly all fabric mods run on quilt1 and quilt has no plans to change that any time soon2, so when I look at it, I do not see a single reason3 to use maintain both fabric and quilt, when you can maintain fabric and have it just work on quilt.
Review
There is a lot of changes that are just plain out wrong and will cause issues as soon as you try and load the template, like changing compileOnly
to implementation
for adding the Common
project as a dependency of the Forge
project, as well as adding support for Fabric to use different type of mappings without those being supported by Forge or Vanilla.
Some changes may have benefit such as adding datagen, however I don't think that really suits this template, not all mods have the need for datagen (I have personally only used it maybe twice in my mods) and not even the Forge MDK or Fabric example mod include it.
I appreciate that you went out of your way to try and improve the template, and I understand that this has been submitted as a draft PR, but with the changes you have made so far, I'm not sure that the end result will be a good fit for this template.
Footnotes
-
https://forum.quiltmc.org/t/are-there-any-plans-about-ending-compatibility-for-fabric/284/2 ↩
-
Yes I have been told that QSL has a better API than FAPI, but in the context of a multi mod-loader template like this, having a better API doesn't mean the API can be used, unless the QSL APIs have an equivalent API for Forge and Fabric, then using it will lead to your mod having different features on different modloaders, which is not good for users. ↩
|
||
def buildProps = project.properties.clone() | ||
processResources { | ||
def buildProps = new HashMap<>(project.properties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this better than project.properties.clone()
?
@@ -8,24 +8,24 @@ | |||
// import and access the vanilla codebase, libraries used by vanilla, and optionally third party libraries that provide | |||
// common compatible binaries. This means common code can not directly use loader specific concepts such as Forge events | |||
// however it will be compatible with all supported mod loaders. | |||
public class CommonClass { | |||
public class CommonInit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the name change?
// This logger is used to write text to the console and the log file. | ||
// It is considered best practice to use your mod id as the logger's name. | ||
// That way, it's clear which mod wrote info, warnings, and errors. | ||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the name change?
Fabric/build.gradle
Outdated
switch (mappings_type) { | ||
case "official" : | ||
mappings loom.officialMojangMappings() | ||
break | ||
case "parchment" : | ||
mappings loom.layered() { | ||
officialMojangMappings() | ||
parchment("org.parchmentmc.data:parchment-${parchment_mc_version}:${parchment_mappings}@zip") | ||
} | ||
break | ||
case "yarn" : | ||
mappings "net.fabricmc:yarn:${minecraft_version}+${yarn_mappings}:v2" | ||
break | ||
case "quilt" : | ||
mappings "org.quiltmc:quilt-mappings:$minecraft_version+$quilt_mappings_version:intermediary-v2" | ||
break | ||
case "quilted_official" : | ||
mappings loom.layered { | ||
mappings "org.quiltmc:quilt-mappings:$minecraft_version+$quilt_mappings_version:intermediary-v2" | ||
officialMojangMappings() | ||
} | ||
break | ||
default : | ||
mappings loom.officialMojangMappings() | ||
break | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole section of code is never going to work until VanillaGradle supports different mapping types besides mojmap, and I don't believe that will be happening anytime soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no plans to change the common project to Loom.
VanillaGradle just works, I have gotten reports that when people try and use loom, it may work for a bit but they always run into issues, but we have had no issues using VanillaGradle.
In those cases, it should be up to the mod authors to decide what they want to do, if they want to add quilt to the environment, report to quilt / fabric to get the bug fixed or to just not support quilt. I feel adding quilt when it is not necessarily needed, will lead to extra work for the majority of mod authors supporting both, when in most cases, they should report that bug to quilt, as it's in their best interest to make sure that they don't introduce bugs in fabric mods. Just note that as I said, I will be cleaning the template up a bit when ForgeGradle 6 releases and we can use Gradle 8, so I don't want you to waste your time now changing things when I will change them again after that happens. Also we do have a discord server if you want to come and discuss your changes with us there: |
To put it plain and simple, quilt is not going to be added to this base template until quilt has a valid reason to be added, which as detailed in my initial reply, I just don't see a reason for it. It especially doesn't help that quilt-loom and fabric-loom are incompatible with each other (As you said above). Saying that, we do already have have an examples branch that features quilt https://github.com/jaredlll08/MultiLoader-Template/tree/1.18.2/examples/MultiLoader-Template-with-quilt If someone wanted to specifically target quilt, they can use that example as a base, but including it in this base template is going to lead to extra work for the majority of modders who do not have a reason to use quilt. |
@@ -28,6 +28,7 @@ common_add_to_javadoc=true | |||
forge_version=44.1.23 | |||
forge_ats_enabled=false | |||
forge_extra_logging=false | |||
systemProp.net.minecraftforge.gradle.check.gradle=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is my understanding that Forge offers zero support for running their plugin on unsupported gradle versions, this is not something I want to ship to end users.
@@ -8,7 +8,7 @@ | |||
// import and access the vanilla codebase, libraries used by vanilla, and optionally third party libraries that provide | |||
// common compatible binaries. This means common code can not directly use loader specific concepts such as Forge events | |||
// however it will be compatible with all supported mod loaders. | |||
public class CommonInit { | |||
public class CommonInit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you adding double spacing here, and in other classes?
I'm going to close this PR as the template has changed a bit since it was made and would most likely require some rewriting of this PR. Feel free to make a new PR if you update the PR. |
This template has become a bit outdated for my usage, so I decided to rewrite it. While the new template works, it needs better testing, please do not merge this right away if you decide to.
Features added:
Changes:
Fixes:
true
)NYI/To do: