No redirect on super calls (#177)
This commit is contained in:
parent
6c17585071
commit
3f5ae63382
@ -36,7 +36,7 @@ public abstract class ItemStackMixin extends CapabilityProvider<ItemStack> imple
|
|||||||
@Shadow @Deprecated private Item item;
|
@Shadow @Deprecated private Item item;
|
||||||
@Shadow private int count;
|
@Shadow private int count;
|
||||||
@Shadow(remap = false) private CompoundNBT capNBT;
|
@Shadow(remap = false) private CompoundNBT capNBT;
|
||||||
@Mutable @Shadow @Final private IRegistryDelegate<Item> delegate;
|
@Mutable @Shadow(remap = false) @Final private IRegistryDelegate<Item> delegate;
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
protected ItemStackMixin(Class<ItemStack> baseClass) {
|
protected ItemStackMixin(Class<ItemStack> baseClass) {
|
||||||
|
|||||||
@ -42,6 +42,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.ListIterator;
|
import java.util.ListIterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class ArclightRedirectAdapter implements PluginTransformer {
|
public class ArclightRedirectAdapter implements PluginTransformer {
|
||||||
@ -162,6 +163,12 @@ public class ArclightRedirectAdapter implements PluginTransformer {
|
|||||||
for (AbstractInsnNode insnNode : methodNode.instructions) {
|
for (AbstractInsnNode insnNode : methodNode.instructions) {
|
||||||
if (insnNode instanceof MethodInsnNode) {
|
if (insnNode instanceof MethodInsnNode) {
|
||||||
MethodInsnNode from = (MethodInsnNode) insnNode;
|
MethodInsnNode from = (MethodInsnNode) insnNode;
|
||||||
|
if (from.getOpcode() == Opcodes.INVOKESPECIAL
|
||||||
|
&& Objects.equals(from.owner, classNode.superName)
|
||||||
|
&& Objects.equals(from.name, methodNode.name)
|
||||||
|
&& Objects.equals(from.desc, methodNode.desc)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
process(from, methodNode.instructions, remapper, classNode);
|
process(from, methodNode.instructions, remapper, classNode);
|
||||||
} else if (insnNode.getOpcode() == Opcodes.INVOKEDYNAMIC) {
|
} else if (insnNode.getOpcode() == Opcodes.INVOKEDYNAMIC) {
|
||||||
InvokeDynamicInsnNode invokeDynamic = (InvokeDynamicInsnNode) insnNode;
|
InvokeDynamicInsnNode invokeDynamic = (InvokeDynamicInsnNode) insnNode;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user