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