FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
225 stars 195 forks source link

Parameter Names are not Mapped in TestFunction Constructor #559

Open shartte opened 2 years ago

shartte commented 2 years ago
    id 'fabric-loom' version '0.10-SNAPSHOT'

    mappings loom.layered() {
        officialMojangMappings()
        parchment("org.parchmentmc.data:parchment-1.17.1:2021.12.12@zip")
    }

Here's a screenshot of the relevant mapping data for the Parchment version above: grafik

Result after genSources:

grafik

Juuxel commented 2 years ago

I wonder if this is similar to #506 in code, where this same issue happened with Yarn 🤔

sfPlayer1 commented 2 years ago

It needs hierarchy aware mapping-io to be fixed properly, I'm working on that.

I believe the issue is that intermediary doesn't have mappings for <init>, which in itself wouldn't be a huge deal, but it also doesn't have mappings for World.getBlockEntity. The cheap fix for <init> would yield invalid results for getBlockEntity, the mapping composition first needs to push the intermediary name from BlockView.getBlockEntity to World.getBlockEntity, then handle <init> by assuming all namespaces have the same name.