-
Notifications
You must be signed in to change notification settings - Fork 36
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
Added NeoForge Support #125
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.
Hey, thought you might find this helpful. I ported this for my own use case but seeing as it was relatively simple, I thought I might as well send over a PR.
Hey! This is very helpful, thanks!
I've tried to keep the project as like yours as possible, so I've kept the gradle setup... Even though this forced me to do a kinda ugly hack around the mods.toml file changes between Forge and Neoforge.
Extra thanks for this. It looks pretty much as I would've probably written it.
It's worth noting, remapping for your use case would likely be fine but in the future, the two versions will likely need larger changes.
That's fine, if it breaks bad enough maybe I'll end up just dropping Forge, that seems to be the direction people are moving in, right?
import yalter.mousetweaks.MouseButton; | ||
|
||
@Mod(Constants.MOD_ID) | ||
public class MouseTweaksForge { |
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.
I guess it makes sense to rename this to something like MouseTweaksNeo
?
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 should be resolved now 👍
Yeah, kinda, although for as little as this mod reaches into the specific mod loaders, it looks like you have a good setup for it :D |
I tested it, seems to work. One thing though: NeoForge complains that
And indeed that file is missing from the neoforge jar, but is present in the forge jar. Is that expected? Also I guess not something we can fix here, but with both forge and neoforge jars in the mods folder, NeoForge tries to load the forge one and fails, and then doesn't try to load the neoforge jar. |
The refmap actually isn't needed on neoforge any more so it might be that we could just patch out that line using process resources, it's hacky but it does mean you wouldn't need to duplicate the file |
Ah then it's probably fine. |
Thanks again! Gonna push to CurseForge and modrinth today. |
How would you like to be credited in the Credits name list? |
If you want to add my name in credits, I typically go be ErrorMikey 👍 |
Hey, thought you might find this helpful. I ported this for my own use case but seeing as it was relatively simple, I thought I might as well send over a PR.
I've tried to keep the project as like yours as possible, so I've kept the gradle setup... Even though this forced me to do a kinda ugly hack around the mods.toml file changes between Forge and Neoforge.
Please let me know if you'd like anything changed.
It's worth noting, remapping for your use case would likely be fine but in the future, the two versions will likely need larger changes.
PS: I have tested this in production and it seems to behave :D