diff --git a/src/main/java/org/spongepowered/asm/mixin/transformer/ClassInfo.java b/src/main/java/org/spongepowered/asm/mixin/transformer/ClassInfo.java index 538198cda..90ad30628 100644 --- a/src/main/java/org/spongepowered/asm/mixin/transformer/ClassInfo.java +++ b/src/main/java/org/spongepowered/asm/mixin/transformer/ClassInfo.java @@ -941,8 +941,8 @@ void addAppliedMixin(MixinInfo mixin) { /** * Get all mixins which target this class */ - Set getMixins() { - return this.isMixin ? Collections.emptySet() : Collections.unmodifiableSet(this.mixins); + public Set getMixins() { + return this.isMixin ? Collections.emptySet() : Collections.unmodifiableSet(this.mixins); } /** @@ -958,6 +958,13 @@ public Set getAppliedMixins() { public boolean isMixin() { return this.isMixin; } + + /** + * Get mixin metadata for this class, if it is a mixin + */ + public IMixinInfo getMixinInfo() { + return this.mixin; + } /** * Get whether this class is loadable mixin diff --git a/src/main/java/org/spongepowered/asm/mixin/transformer/MixinInfo.java b/src/main/java/org/spongepowered/asm/mixin/transformer/MixinInfo.java index 24eafa86d..6948d69e7 100644 --- a/src/main/java/org/spongepowered/asm/mixin/transformer/MixinInfo.java +++ b/src/main/java/org/spongepowered/asm/mixin/transformer/MixinInfo.java @@ -1376,7 +1376,7 @@ public void postApply(String transformedName, ClassNode targetClass) throws Exce } this.parent.postApply(transformedName, targetClass); - this.info.addAppliedMixin(this); + ClassInfo.fromClassNode(targetClass).addAppliedMixin(this); } /* (non-Javadoc)