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

[Loom 1.6] Fix NeoForge mapping issues with NeoForge interfaces #207

Closed
wants to merge 20 commits into from

Conversation

Jab125
Copy link
Member

@Jab125 Jab125 commented Apr 23, 2024

Closes #206

This pull request fixes any issues introduced with neoforged/NeoForge#835, due to ClientCommonPacketListenerImpl#send and ServerCommonPacketListenerImpl#send having different intermediary and official names by skipping the intermediary and official remaps entirely, instead remapping straight from mojang to named.

If an alternate mapping set has the same names for both net.minecraft.class_8673.method_52787 and net.minecraft.class_8609.method_14364, which Yarn does (sendPacket), then the remapper will be able to successfully apply the name change to the interface and everything just works.

The decompiled output might be slightly off at times, but everything will compile fine.

@Jab125 Jab125 changed the title [Loom 1.6] Fix NeoForge mapping issues in https://github.com/neoforged/NeoForge/pull/835 [Loom 1.6] Fix NeoForge mapping issues with NeoForge interfaces Apr 23, 2024
@Jab125 Jab125 requested a review from Juuxel April 23, 2024 07:45
@Jab125
Copy link
Member Author

Jab125 commented Apr 23, 2024

I would like to add that the test I added only works on Java 21+, and when running on a version lower than Java 21, the test effectively skips itself.

@embeddedt
Copy link

Does this have any impact on the name that vanilla lambdas get assigned?

@Jab125
Copy link
Member Author

Jab125 commented Apr 24, 2024

Does this have any impact on the name that vanilla lambdas get assigned?

Lambdas appear to get intermediary names, such as method_55608

@Jab125
Copy link
Member Author

Jab125 commented Apr 24, 2024

The test may need to be special cased to only run on Java 21.

desht added a commit to FTBTeam/FTB-Library that referenced this pull request Apr 30, 2024
Compiles and runs, not heavily tested yet

ItemStack "NBT" editing still works, even with components; component data is serialized
to NBT for the NBT editor, and deserialized back to the stack if changes are made

Arch FluidStack.empty() currently broken (returning null, causes crashes in fluid selection
screens)

Won't work with NeoForge 20.6.3-beta or later due to arch/neoforge mappings issues
(see architectury/architectury-loom#207)

No MinecraftForge support at all yet
@Jab125
Copy link
Member Author

Jab125 commented May 2, 2024

Superseded by #209

@Jab125 Jab125 closed this May 2, 2024
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.

NeoForge Merges Mojmap Methods Causing Intermediary Mapping Conflicts
5 participants