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

[Bug] Terralith is not compatible with NeoForge 1.20.2+ despite being marked as such #86

Closed
XFactHD opened this issue Dec 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@XFactHD
Copy link

XFactHD commented Dec 13, 2023

What Minecraft version(s) does this apply to?

1.20

Project version

v2.4.10

Mod or datapack version?

Mod (Forge)

Describe the bug

Due to NeoForge renaming packages from net.minecraftforge to net.neoforged.neoforge in the 1.20.2 update, the main mod class is not recognized when loaded on NeoForge as the @Mod annotation is not the one NeoForge is looking for. There are two ways to alleviate this issue:

  • Provide two main mod classes, one with the MCForge annotation and one with the NeoForge annotation. This would of course require compiling against both in some way
  • Remove the main mod class (it seems to serve little to no purpose anyway, considering the Fabric side doesn't have one at all since it doesn't enforce the presence of any mod entrypoint) and use lowcodefml instead of javafml in the modLoader field of the mods.toml. This signals to MCForge and NeoForge that the mod is effectively "just" a datapack and/or resourcepack packaged as a mod, i.e. for ease of use (which is as far as I can tell the whole point of shipping Terralith as a mod anyway). The lowcode loader has existed for this purpose in MCForge since some time in 1.18.

I noticed this issue when I attempted to reproduced the issue reported in neoforged/NeoForge#381.

Additional context

No response

@XFactHD XFactHD added the bug Something isn't working label Dec 13, 2023
@catter1
Copy link
Contributor

catter1 commented Dec 13, 2023

Yeah, we were debating for a bit on our end "does anything actually break on Neoforge, or can we just add a reference to it in the mods.toml?", and looks like we were wrong. For now, I'll remove the Neoforge classification on CF/MR. The reason the mod class exists, is because I'm stubborn :) I'll find a workaround for it when I have time later in the month.

A little sad to see a modloader breaking change like this in 1.20.x, as I was kind of hoping it would wait until 1.21 so we could cleanly transition to Neoforge then. But I understand why.

@lukebemish
Copy link

You should be able to just set the loader to lowcodefml version [1,), and remove the mod main class entirely (as it doesn't do anything you actually need), and it'll work on both loaders just fine

@catter1
Copy link
Contributor

catter1 commented Dec 18, 2023

Correct, but I am stubborn. When I have the chance later on, I'll find a workaround to fit my plan.

@catter1
Copy link
Contributor

catter1 commented May 8, 2024

Fixed in 2.5.0

@catter1 catter1 closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants