QuiltMC/quilt-enigma-plugin

`simple_type_field_names` aren't always reflected in the editor (`java.util.function` `@FunctionalInterface` implementations)

Opened this issue · 2 comments

When working on SequenceLootFunction.mapping I noticed the ItemStack param of public ItemStack apply(ItemStack arg, LootContext arg2) didn't appear mapped despite its simple type name.

I also tried adding this simple type name: "net/minecraft/unmapped/C_iakykpgh": "context", // LootContext and not only was the param above not proposed, but no LootContext param was proposed (I reset to obfuscated to test), except one:
ConditionalLootFunction's protected abstract ItemStack process(ItemStack stack, LootContext context);
Its ItemStack param was also proposed.

Having done this I've noticed that all methods missing param proposals implement a java.util.function @FunctionalInterface method, except for the one exception above.

The methods have their simple type names in fakeSource/, so I think the issue is confined to the editor.

Resetting KilledByPlayerLootCondition::test's param to obfuscated and then trying to re-map it result in this:

METHOD test (Ljava/lang/Object;)Z
+METHOD m_lhpybxfc (Lnet/minecraft/unmapped/C_iakykpgh;)Z
	ARG 1 context

and the name doesn't show up in the editor.
Seems like it doesn't know that test isn't obfuscated (it's from java.util.function.Predicate).

It could be related to the fact that I think we know that function interface parameters aren't obfuscated (for some reason)