-
-
Notifications
You must be signed in to change notification settings - Fork 448
Open
Labels
FG6This request is for FG 6This request is for FG 6
Description
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.
ForgeGradle/src/mcp/java/net/minecraftforge/gradle/mcp/OfficialChannelProvider.java
Lines 99 to 108 in 651e43f
for (IMappingFile.IField fld : cls.getFields()) { | |
String name = obf.remapField(fld.getMapped()); | |
if (name.startsWith("field_") || name.startsWith("f_")) | |
sfields.put(name, fld.getOriginal()); | |
} | |
for (IMappingFile.IMethod mtd : cls.getMethods()) { | |
String name = obf.remapMethod(mtd.getMapped(), mtd.getMappedDescriptor()); | |
if (name.startsWith("func_") || name.startsWith("m_")) | |
smethods.put(name, mtd.getOriginal()); | |
} |
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.
Metadata
Metadata
Assignees
Labels
FG6This request is for FG 6This request is for FG 6