Skip to content

Mixin changes#31

Merged
marchermans merged 6 commits intoneoforged:mainfrom
Technici4n:mixin-changes
Nov 2, 2023
Merged

Mixin changes#31
marchermans merged 6 commits intoneoforged:mainfrom
Technici4n:mixin-changes

Conversation

@Technici4n
Copy link
Member

@Technici4n Technici4n commented Nov 1, 2023

This changes mixin handling for NeoForge.

TL;DR

  • Use a mods.toml entry to register mixins to NeoForge now:
[[mixins]]
config = "modid.mixins.json"
[[mixins]]
config = "modid.more_mixins.json"
  • Add extra config files to use with --fml.mixinConfig.
  • The old manifest entry and --mixin.config options will still work, but they are discouraged. (Especially the option as it will cause issues if a dependency error occurs).

More detailed list of changes

  • A mod can now add mods.toml entries to supply mixin configs.
    This approach will work both in dev and in prod, and means that we can get rid of the custom support in NG.
  • Mod jars are not added to the GAME layer anymore if there is an error when computing the mod list.
    This means that mixins now get disabled if there is an error when computing the mod list (e.g. missing dependency).
  • If mixins get disabled due to an error then the --mixin.config option will fail because it can't find the mixin config file. To fix this, this PR adds the new --fml.mixinConfig option that will only attempt to add the mixin configs after the loading mod list is computed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants