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

Added NeoForge Support #125

Merged
merged 4 commits into from
Mar 4, 2024
Merged

Added NeoForge Support #125

merged 4 commits into from
Mar 4, 2024

Conversation

MichaelHillcox
Copy link
Contributor

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

Copy link
Owner

@YaLTeR YaLTeR left a 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 {
Copy link
Owner

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?

Copy link
Contributor Author

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 👍

@MichaelHillcox
Copy link
Contributor Author

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?

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

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 3, 2024

I tested it, seems to work. One thing though: NeoForge complains that

Reference map 'mousetweaks.mixins.refmap.json' for mousetweaks.mixins.json could not be read. If this is a development environment you can ignore this message

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.

@MichaelHillcox
Copy link
Contributor Author

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

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 3, 2024

Ah then it's probably fine.

@YaLTeR YaLTeR merged commit 9d563e8 into YaLTeR:master Mar 4, 2024
1 check passed
@YaLTeR
Copy link
Owner

YaLTeR commented Mar 4, 2024

Thanks again! Gonna push to CurseForge and modrinth today.

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 4, 2024

How would you like to be credited in the Credits name list?

@MichaelHillcox
Copy link
Contributor Author

If you want to add my name in credits, I typically go be ErrorMikey 👍

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 4, 2024

Pushed:

Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants