Package dev.architectury.loom.forge
Class MethodInheritanceMappingsMigrator
java.lang.Object
dev.architectury.loom.forge.MethodInheritanceMappingsMigrator
- All Implemented Interfaces:
MappingsMigrator
With some forge patches, methods can inherit methods from a class that is not in the mappings.
This migrator will try to detect all the methods that are inherited from a class that is not in the mappings,
see if there are different names for the same method in the mappings, and remove them.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.architectury.loom.forge.MappingsMigrator
MappingsMigrator.Inputs, MappingsMigrator.MappingsEntry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmigrate(List<MappingsMigrator.MappingsEntry> entries, Consumer<String> info) longsetup(MappingsMigrator.Inputs inputs) 准备本次迁移所需的中间数据,并返回参与「迁移产物就绪标记」的哈希.
-
Constructor Details
-
MethodInheritanceMappingsMigrator
public MethodInheritanceMappingsMigrator()
-
-
Method Details
-
setup
Description copied from interface:MappingsMigrator准备本次迁移所需的中间数据,并返回参与「迁移产物就绪标记」的哈希.缓存未命中时本方法要按路径读 patched 中间产物(
FieldMappingsMigrator读它的字段描述符、MethodInheritanceMappingsMigrator读它的继承关系),因此该路径必须由调用方**显式给出** (见MappingsMigrator.Inputs.patchedIntermediateJar()):配置期路径给的是自己刚产出的那一件, 执行期任务给的是它声明的@InputFile。早先这里由实现内部向MinecraftPatchedProvider现取,那正是「配置期按路径读执行期产物」的根源。- Specified by:
setupin interfaceMappingsMigrator- Throws:
IOException
-
migrate
public void migrate(List<MappingsMigrator.MappingsEntry> entries, Consumer<String> info) throws IOException - Specified by:
migratein interfaceMappingsMigrator- Throws:
IOException
-