[6.0] Generated methods CSV doesn't support record method names

Open
#922 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start in src/mcp/java/net/minecraftforge/gradle/mcp/OfficialChannelProvider.java around lines 99–108 and inspect how method and field prefixes are classified. Check the generated method and field CSV output for record accessors such as NoiseGeneratorSettings.surfaceRule; done means those accessor methods are retained as methods and can be remapped at runtime.

Written by the indexing model from the issue text.

Description

FG6

Currently, the generator for method and field CSV files, OfficialChannelProvider, distinguishes methods and fields by their prefix, which is func_ / m_ for methods and field_ / f_ for fields. However, in records, the names of accessor methods are the same as the field they're accessing. As an example, see NoiseGeneratorSettings.surfaceRule.

https://github.com/MinecraftForge/ForgeGradle/blob/651e43fd7c68068c835548583c5eb924e13d9251/src/mcp/java/net/minecraftforge/gradle/mcp/OfficialChannelProvider.java#L99-L108

This leads to all record method names being filtered out as fields by the generator.
When the mappings are later used at runtime by modlauncher for remapping class member names, record methods will never be remapped due to this issue.

Dominant language
Java
Stars
574
Forks
450
Avg merge
16h 20m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MinecraftForge/ForgeGradle

All issues in MinecraftForge/ForgeGradle

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.