diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java deleted file mode 100644 index f41d71c3..00000000 --- a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.java +++ /dev/null @@ -1,24 +0,0 @@ -package dev.openrs2.deob.transform; - -import dev.openrs2.asm.classpath.ClassPath; -import dev.openrs2.asm.classpath.Library; -import dev.openrs2.asm.transform.Transformer; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.tree.ClassNode; - -public final class CanvasTransformer extends Transformer { - @Override - public boolean transformClass(ClassPath classPath, Library library, ClassNode clazz) { - if (!"java/awt/Canvas".equals(clazz.superName)) { - return false; - } - - if ((clazz.access & Opcodes.ACC_FINAL) == 0) { - return false; - } - - clazz.interfaces.remove("java/awt/event/FocusListener"); - - return false; - } -} diff --git a/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt new file mode 100644 index 00000000..a6e18d5c --- /dev/null +++ b/deob/src/main/java/dev/openrs2/deob/transform/CanvasTransformer.kt @@ -0,0 +1,26 @@ +package dev.openrs2.deob.transform + +import dev.openrs2.asm.classpath.ClassPath +import dev.openrs2.asm.classpath.Library +import dev.openrs2.asm.transform.Transformer +import org.objectweb.asm.Opcodes +import org.objectweb.asm.tree.ClassNode + +class CanvasTransformer : Transformer() { + public override fun transformClass( + classPath: ClassPath, + library: Library, + clazz: ClassNode + ): Boolean { + if (clazz.superName != "java/awt/Canvas") { + return false + } + + if (clazz.access and Opcodes.ACC_FINAL == 0) { + return false + } + + clazz.interfaces.remove("java/awt/event/FocusListener") + return false + } +}