From 5446a322d4db6e335e933bbf4d2424db98207803 Mon Sep 17 00:00:00 2001 From: asie Date: Thu, 25 Oct 2018 11:51:01 +0200 Subject: [PATCH] fix refmap generation --- .../loom/mixin/MixinMappingProviderTiny.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/mixin/MixinMappingProviderTiny.java b/src/main/java/net/fabricmc/loom/mixin/MixinMappingProviderTiny.java index e63db8e..1e79fce 100644 --- a/src/main/java/net/fabricmc/loom/mixin/MixinMappingProviderTiny.java +++ b/src/main/java/net/fabricmc/loom/mixin/MixinMappingProviderTiny.java @@ -71,14 +71,20 @@ 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; @@ -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