FabricMC / fabric-loom

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

Injected Interfaces Expansion => Generics Support #1050

Closed FirstMegaGame4 closed 4 months ago

FirstMegaGame4 commented 4 months ago

Before this pull request, modders were able to add injected interfaces in other classes, but they were not able to use generics for them. This pull request allows to specify the raw generics signature (which is a part of the ClassSignature) after the interface name in fabric.mod.json, solving the issue.

Examples:

Before:

"net/minecraft/class_x": [
    "com/example/WithoutGenerics",
    "com/example/WithGenerics" // but we can't specify them
]

After:

"net/minecraft/class_x": [
    "com/example/WithoutGenerics",
    "com/example/WithGenerics<Ljava/lang/String;>"
]

Fixes #597