-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Description
I noticed a mod of mine crashing in prod and after investigating i found out that some methods are not properly remapped.
This happened when i try to use a class from another lib that contains a vanilla method.
Using loom 1.11.8
with official mapping
How to reproduce:
- Make a clean new project.
- Add
SmartBrainLib
as a dependency (i noticed with this lib) - Extend following class + override the method:
https://github.com/Tslat/SmartBrainLib/blob/main/common/src/main/java/net/tslat/smartbrainlib/api/core/behaviour/ExtendedBehaviour.java#L201 - Build the mod. Use a decompiler and check the class. The method is still unmapped.
Update:
I've now tracked down the problem to generics:
Following class with the method will fail to get remapped:
Official mappings used below
public class Dummy<E extends Mob> extends Behavior<E> {
[...]
// Vanilla method
@Override
protected boolean checkExtraStartConditions(ServerLevel level, E entity) {
return false;
}
}
If E
is LivingEntity then the method will remap fine as Behavior is defined as Behavior<E extends LivingEntity>
but anything else causes it to fail remapping
Metadata
Metadata
Assignees
Labels
No labels