fix refmap generation
parent
2c5e50b5a3
commit
5446a322d4
|
@ -71,15 +71,21 @@ public class MixinMappingProviderTiny extends MappingProvider {
|
|||
|
||||
for (Class cc : c.getInterfaces()) {
|
||||
mapped = getMethodMapping(method.move(cc.getName().replace('.', '/')));
|
||||
if (mapped != null)
|
||||
if (mapped != null) {
|
||||
mapped = mapped.move(classMap.getOrDefault(method.getOwner(), method.getOwner()));
|
||||
methodMap.put(method, mapped);
|
||||
return mapped;
|
||||
}
|
||||
}
|
||||
|
||||
if (c.getSuperclass() != null) {
|
||||
mapped = getMethodMapping(method.move(c.getSuperclass().getName().replace('.', '/')));
|
||||
if (mapped != null)
|
||||
if (mapped != null) {
|
||||
mapped = mapped.move(classMap.getOrDefault(method.getOwner(), method.getOwner()));
|
||||
methodMap.put(method, mapped);
|
||||
return mapped;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
|
@ -96,18 +102,14 @@ public class MixinMappingProviderTiny extends MappingProvider {
|
|||
if (mapped != null)
|
||||
return mapped;
|
||||
|
||||
try {
|
||||
return null;
|
||||
|
||||
/* try {
|
||||
Class c = this.getClass().getClassLoader().loadClass(field.getOwner().replace('/', '.'));
|
||||
if (c == null || c == Object.class) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (Class cc : c.getInterfaces()) {
|
||||
mapped = getFieldMapping(field.move(cc.getName().replace('.', '/')));
|
||||
if (mapped != null)
|
||||
return mapped;
|
||||
}
|
||||
|
||||
if (c.getSuperclass() != null) {
|
||||
mapped = getFieldMapping(field.move(c.getSuperclass().getName().replace('.', '/')));
|
||||
if (mapped != null)
|
||||
|
@ -118,7 +120,7 @@ public class MixinMappingProviderTiny extends MappingProvider {
|
|||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
// TODO: Unify with tiny-remapper
|
||||
|
|
Loading…
Reference in New Issue