Skip to content

Commit

Permalink
fix: We need to transform classes that have @SubscribeEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofbolyai committed Nov 26, 2022
1 parent 255e4e6 commit ac60fde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
}

group "com.wynntils.eventbustransformer"
version = "1.1.2"
version = "1.1.3"

java {
toolchain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public dev.architectury.transformer.shadowed.impl.org.objectweb.asm.tree.ClassNo

Type type = Type.getObjectType(node.name);
String className = type.getClassName();
if (engine.handlesClass(type) && className.startsWith("com.wynntils") && className.contains("Event")) {
if (engine.handlesClass(type) && className.startsWith("com.wynntils")) {
LOGGER.debug("Transforming class " + className);
dev.architectury.transformer.shadowed.impl.org.objectweb.asm.ClassWriter architecturyClassWriter = new dev.architectury.transformer.shadowed.impl.org.objectweb.asm.ClassWriter(0);
node.accept(architecturyClassWriter);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/wynntils/eventbustransformer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void main(String[] args) throws IOException {
if (next.getName().endsWith(".class")) {
Type type = Type.getObjectType(next.getName().replace(".class", ""));
String className = type.getClassName();
if (engine.handlesClass(type) && className.startsWith("com.wynntils") && className.contains("Event")) {
if (engine.handlesClass(type) && className.startsWith("com.wynntils")) {
LOGGER.debug("Transforming class " + type.getClassName());
ClassReader reader = new ClassReader(content);
ClassNode node = new ClassNode();
Expand Down

0 comments on commit ac60fde

Please sign in to comment.