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

Support for NeoForge #85

Closed
rlnt opened this issue Jul 25, 2023 · 12 comments
Closed

Support for NeoForge #85

rlnt opened this issue Jul 25, 2023 · 12 comments

Comments

@rlnt
Copy link

rlnt commented Jul 25, 2023

I don't know if you've heard about the new NeoForge project, which is a fork of Forge.
If not, you can read more about that here.

Since the team of this loader consists of the entire Forge mod loader team except for one person, it's pretty clear that this will probably be the replacement for Forge in the future. So CurseForge and Modrinth have decided to support it as soon as possible. I know Modrinth's support is already done and CurseForge already supports it in their overlay, but I'm not sure about their API.

Whenever it is possible, it would be very useful if mc-publish would support this new loader.

@rlnt
Copy link
Author

rlnt commented Jul 26, 2023

Apparently, it's already working fine with the current release although the loader is not listed here: https://github.com/Kir-Antipov/mc-publish/blob/v3.3/preview/src/loaders/loader-type.ts

@Kira-NT
Copy link
Owner

Kira-NT commented Jul 27, 2023

I don't know if you've heard about the new NeoForge project, which is a fork of Forge.

Regrettably, I've not. At the moment, there's a lot of stuff happening around me, and since I lost my main source of news about the Minecraft community via Discord servers (my account was suspended as I tried to respond to people I messaged earlier (it seems this is now a crime), and I'm now being ghosted by their support), I'm not completely up to date with what's happening there. So, thank you for keeping me informed!

Based on my limited understanding of the topic after a quick investigation, Forge mods and NeoForge mods appear to be indistinguishable for now, since they are intercompatible:

At the present time, mods built by either system should be intercompatible between forks.

So, mc-publish is able to publish NeoForge mods and read their metadata without any additional actions on my part. However, you would need to manually specify neoforge loader in your configuration:

loaders: |
  forge
  neoforge

Or directly in your mods.toml (mc-publish v3.3+):

[mc-publish]
  loaders=["forge", "neoforge"]

I won't switch the default from forge to neoforge, as, to the best of my understanding, NeoForge supports 1.20+ mods, while Forge has been around from the very beginning. Therefore, it's much more likely for someone to publish a Forge mod rather than a NeoForge mod.

However, I've initiated a discussion in the NeoForge repo (neoforged/NeoForge#58) to gather more information on how we might distinguish mods in the future. I will act accordingly to the feedback I receive there. Rest assured, when these two loaders fully diverge, mc-publish will be capable of automatically detecting the type of mod you're uploading.

Apparently, it's already working fine with the current release although the loader is not listed here: https://github.com/Kir-Antipov/mc-publish/blob/v3.3/preview/src/loaders/loader-type.ts

mc-publish can publish a txt file if you want it to. The LoaderType doesn't represent an exhaustive list of loaders for which mc-publish can publish mods. Instead, it's an exhaustive list of loaders whose metadata formats mc-publish can understand and read to automatically infer values such as version, loaders, dependencies, and so on. And since NeoForge mods are essentially Forge mods right now, the ForgeMetadataReader can handle them just fine.

Given all of the above, I don't think any action on my part is necessary at this time. However, if I missed something or if you're having troubles publishing NeoForge mods, please let me know!

@tr7zw
Copy link

tr7zw commented Oct 31, 2023

my account was suspended

Ah, I was wondering what happened there. Also a Neo now has 1.20.2 builds, and in the toml they have as a Dependency the mod "neoforge", so that can be used to detect them, as its no longer forge compatible.

@Kira-NT
Copy link
Owner

Kira-NT commented Nov 3, 2023

Thanks for the update! Did they make any other changes to the metadata format? Also, is there a wiki where I can read about it just to be absolutely sure?

@rlnt
Copy link
Author

rlnt commented Nov 3, 2023

I think an in-depth explanation will follow in the upcoming update primer. No wiki for now. Just the explanation from all the PRs.

@tr7zw
Copy link

tr7zw commented Nov 3, 2023

https://github.com/neoforged/MDK/blob/main/src/main/resources/META-INF/mods.toml The current MDK is on Github, and that was the only difference sticking out to me.

@Minecraftschurli
Copy link
Contributor

@Kir-Antipov automatic neoforge detection would be a nice thing since most mods in 1.20.2 and after will be for neoforge.
Yes the modid changed from forge to neoforge so that can be used to determine the loader.
As for the mods.toml format at the moment we have not made any major changes, just added a utility field to define mixin configs from the mods.toml.
If you still have issues with discord and/or have any questions feel free to ask me as I am now a maintainer at neoforged.

@Kira-NT
Copy link
Owner

Kira-NT commented Jan 14, 2024

I apologize that it took me a while. I'm currently working on lots of stuff :)

If you still have issues with discord and/or have any questions feel free to ask me as I am now a maintainer at neoforged.

Deeply appreciated! If the metadata format hasn't changed and the only difference is the modid, that's all I need to know at the moment.

@Minecraftschurli
Copy link
Contributor

we recently changed the format for requirement from the mandatory boolean to a type enum (you can read up on it here: neoforged/NeoForge@8786a13)

@Kira-NT
Copy link
Owner

Kira-NT commented Jan 14, 2024

Doh, ok, reopening the issue xD

@Kira-NT Kira-NT reopened this Jan 14, 2024
@Kira-NT
Copy link
Owner

Kira-NT commented Jan 14, 2024

@Minecraftschurli, could you please take a quick look at this placeholder file I use for testing purposes, to confirm if I've got it right?

@Minecraftschurli
Copy link
Contributor

looks fine but those empty ranges are not needed since we now default to an all accepting version range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants