project: we are actually up to date now, thanks blue!
This commit is contained in:
@@ -31,6 +31,9 @@ tasks.register<JavaExec>("inject") {
|
||||
main = "com.openosrs.injector.Injector"
|
||||
classpath = sourceSets["main"].runtimeClasspath
|
||||
args(vanillaDep.singleFile, openosrsVersion)
|
||||
outputs.upToDateWhen {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
@@ -118,9 +118,9 @@ public class RSApiInjector extends AbstractInjector
|
||||
|
||||
final Signature sig = apiMethod.getSignature();
|
||||
|
||||
if (sig.isVoid())
|
||||
if (sig.size() == 1)
|
||||
{
|
||||
if (sig.size() == 1)
|
||||
if (sig.isVoid() || sig.getReturnValue().equals(Type.fromAsmString(apiMethod.getClazz().getName())))
|
||||
{
|
||||
Type type = InjectUtil.apiToDeob(inject, sig.getTypeOfArg(0));
|
||||
if (deobType.equals(type))
|
||||
@@ -276,7 +276,7 @@ public class RSApiInjector extends AbstractInjector
|
||||
final ClassFile targetClass = InjectUtil.vanillaFromApiMethod(inject, apiMethod);
|
||||
apiMethod.setInjected(true);
|
||||
|
||||
if (apiMethod.getSignature().isVoid())
|
||||
if (apiMethod.getSignature().getArguments().size() == 1)
|
||||
{
|
||||
++set;
|
||||
log.debug("[DEBUG] Injecting setter {} for {} into {}", apiMethod.getMethod(), field.getPoolField(), targetClass.getPoolClass());
|
||||
|
||||
@@ -102,7 +102,15 @@ public class InjectSetter
|
||||
ins.add(new PutField(instructions, field));
|
||||
}
|
||||
|
||||
ins.add(new VReturn(instructions));
|
||||
if (!apiMethod.getSignature().getReturnValue().equals(Type.VOID))
|
||||
{
|
||||
ins.add(new ALoad(instructions, 0));
|
||||
ins.add(InjectUtil.createReturnForType(instructions, apiMethod.getSignature().getReturnValue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ins.add(new VReturn(instructions));
|
||||
}
|
||||
|
||||
targetClass.addMethod(method);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user