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

Update SpongeForge to Minecraft 1.19.4 #3898

Merged
merged 41 commits into from
Dec 20, 2023
Merged

Update SpongeForge to Minecraft 1.19.4 #3898

merged 41 commits into from
Dec 20, 2023

Conversation

Yeregorix
Copy link
Member

@Yeregorix Yeregorix commented Sep 10, 2023

Context

ModLauncher has added 4 ModuleLayers. Each with specific roles.

ModLauncher layers

We can choose which layer we want our classes to be loaded in, per jar by declaring the correct mod type in the mod manifest or the Java manifest.

Only the GAME layer is transformable.

Notable changes

  • Gradle plugin architectury-loom has been updated from 0.7.2-SNAPSHOT to 1.1-SNAPSHOT (we are still using a fork)
  • Instead of remapping mojmap AW to srg AW, loom is now converting it to srg AT
  • applaunch is now packaged in a separate jar because IModLocators must be loaded in the SERVICE layer.
  • A new sourceset lang has been added and is packaged in a separate jar because language providers must be loaded in the PLUGIN layer.
  • We can no longer use Mixin on FML. PluginContainer is now implemented via a wrapper instead of a mixin.
  • Libraries that must be transformed must now have a GAMELIBRARY mod type instead of LIBRARY. Eg: adventure.
  • Everything is packaged with a custom made jar-in-jar strategy. The root jar is the service jar. It contains a mod jar and a lang jar.
  • We used to register dummy mod containers for sponge and spongeapi. We now register proper mods so we can declare everything into a single mods.toml. As required by FML.
  • PluginModContainer no longer extends FMLModContainer.
  • We are now transforming any class containing the @Listener annotation. We add 3 instructions in <clinit> to obtain a privileged MethodHandles.Lookup.

TODO

  • No longer shade AW transformer in SF because we are now using ATs. This will be done later when updating ModLauncher in SpongeVanilla.

@Yeregorix Yeregorix force-pushed the api10/forge branch 2 times, most recently from 2e1d5c8 to 3aa2b75 Compare October 22, 2023 18:29
@Yeregorix Yeregorix marked this pull request as ready for review October 22, 2023 18:43
@ImMorpheus ImMorpheus added the version: 1.19 API: 10 label Nov 3, 2023
}

for (ForgeRegistry.Snapshot snapshot : cir.getReturnValue().values()) {
snapshot.ids.keySet().removeIf(loc -> loc.getNamespace().equals("sponge"));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure filtering sponge data here is the correct solution. Also, this currently doesn't support any data registered by plugins.

@Yeregorix Yeregorix merged commit d469dbd into api-10 Dec 20, 2023
8 checks passed
@Yeregorix Yeregorix deleted the api10/forge branch December 20, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants