diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/code/ISliceContext.java b/src/main/java/org/spongepowered/asm/mixin/injection/code/ISliceContext.java index 31d9642d6..67a7c9f06 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/code/ISliceContext.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/code/ISliceContext.java @@ -31,4 +31,6 @@ */ public interface ISliceContext extends IInjectionPointContext { + public abstract MethodSlice getSlice(String id); + } diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/code/InjectorTarget.java b/src/main/java/org/spongepowered/asm/mixin/injection/code/InjectorTarget.java index 13e9fdb36..29ec0675c 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/code/InjectorTarget.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/code/InjectorTarget.java @@ -30,7 +30,6 @@ import org.spongepowered.asm.lib.tree.InsnList; import org.spongepowered.asm.lib.tree.MethodNode; import org.spongepowered.asm.mixin.injection.InjectionPoint; -import org.spongepowered.asm.mixin.injection.struct.InjectionInfo; import org.spongepowered.asm.mixin.injection.struct.Target; /** @@ -42,7 +41,7 @@ public class InjectorTarget { /** * Owner injector */ - private final InjectionInfo info; + private final ISliceContext context; /** * Cache of slices @@ -57,11 +56,11 @@ public class InjectorTarget { /** * ctor * - * @param info owner + * @param context owner * @param target target */ - public InjectorTarget(InjectionInfo info, Target target) { - this.info = info; + public InjectorTarget(ISliceContext context, Target target) { + this.context = context; this.target = target; } @@ -88,7 +87,7 @@ public MethodNode getMethod() { public InsnList getSlice(String id) { ReadOnlyInsnList slice = this.cache.get(id); if (slice == null) { - MethodSlice sliceInfo = this.info.getSlice(id); + MethodSlice sliceInfo = this.context.getSlice(id); if (sliceInfo != null) { slice = sliceInfo.getSlice(this.target.method); } else { diff --git a/src/main/java/org/spongepowered/asm/mixin/injection/struct/InjectionInfo.java b/src/main/java/org/spongepowered/asm/mixin/injection/struct/InjectionInfo.java index 83817fe9c..7a3889e8f 100644 --- a/src/main/java/org/spongepowered/asm/mixin/injection/struct/InjectionInfo.java +++ b/src/main/java/org/spongepowered/asm/mixin/injection/struct/InjectionInfo.java @@ -287,6 +287,7 @@ public Collection getTargets() { /** * Get the slice descriptors */ + @Override public MethodSlice getSlice(String id) { return this.slices.get(this.getSliceId(id)); }