[Fabric] Write all descriptors which were remapped, regardless of whether or not they are actually different

This commit is contained in:
asie committed 2019-09-16 19:09:35 +02:00
1 parent 125d5e9847
commit bb5a3c6900
4 files changed
+18 -11

No files matched your search

@@ -248,7 +248,7 @@ public abstract class ObfuscationEnvironment implements IObfuscationEnvironment
return mapping.move(remappedOwner);
}
String desc = ObfuscationUtil.mapDescriptor(mapping.getDesc(), this.remapper);
return new MappingMethod(remappedOwner, mapping.getSimpleName(), desc);
return new MappingMethod(remappedOwner, mapping.getSimpleName(), desc != null ? desc : mapping.getDesc());
}
return null;
}
@@ -275,7 +275,7 @@ public abstract class ObfuscationEnvironment implements IObfuscationEnvironment
String desc = method.getDesc();
if (desc != null) {
String newDesc = ObfuscationUtil.mapDescriptor(method.getDesc(), this.remapper);
if (!newDesc.equals(method.getDesc())) {
if (newDesc != null) {
desc = newDesc;
transformed = true;
}
@@ -293,7 +293,8 @@ public abstract class ObfuscationEnvironment implements IObfuscationEnvironment
*/
@Override
public String remapDescriptor(String desc) {
return ObfuscationUtil.mapDescriptor(desc, this.remapper);
String newDesc = ObfuscationUtil.mapDescriptor(desc, this.remapper);
return newDesc != null ? newDesc : desc;
}
/**