aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-06-13 12:15:11 +0700
committerGitHub <noreply@github.com>2022-06-13 12:15:11 +0700
commit2fcd6f24968967f1ebe7515bab8c7f36cf6dd1a8 (patch)
treea0e268769f391846ec486df5ae5076406b9ed8cb /src/main/java/cc/polyfrost
parentbcdb9ed93960b972d137de17ef0253d3e83deb38 (diff)
downloadOneConfig-2fcd6f24968967f1ebe7515bab8c7f36cf6dd1a8.tar.gz
OneConfig-2fcd6f24968967f1ebe7515bab8c7f36cf6dd1a8.tar.bz2
OneConfig-2fcd6f24968967f1ebe7515bab8c7f36cf6dd1a8.zip
fix dupe asm
Diffstat (limited to 'src/main/java/cc/polyfrost')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/internal/plugin/asm/tweakers/VigilantTransformer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/plugin/asm/tweakers/VigilantTransformer.java b/src/main/java/cc/polyfrost/oneconfig/internal/plugin/asm/tweakers/VigilantTransformer.java
index 4f0c3b2..bc87e4c 100644
--- a/src/main/java/cc/polyfrost/oneconfig/internal/plugin/asm/tweakers/VigilantTransformer.java
+++ b/src/main/java/cc/polyfrost/oneconfig/internal/plugin/asm/tweakers/VigilantTransformer.java
@@ -39,7 +39,7 @@ public class VigilantTransformer implements ITransformer {
@Override
public void transform(String transformedName, ClassNode node) {
- if (!didMixin) {
+ if (!didMixin && !node.interfaces.contains("cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilantAccessor")) {
node.fields.add(new FieldNode(Opcodes.ACC_PUBLIC, "oneconfig$config", Type.getDescriptor(VigilanceConfig.class), null, null));
node.fields.add(new FieldNode(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "oneconfig$file", Type.getDescriptor(File.class), null, null));
@@ -110,7 +110,7 @@ public class VigilantTransformer implements ITransformer {
// this is the method above but using spongemixin's stupid relocate asm and static
public static void transform(org.spongepowered.asm.lib.tree.ClassNode node) {
- if (!didASM) {
+ if (!didASM && !node.interfaces.contains("cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilantAccessor")) {
node.fields.add(new org.spongepowered.asm.lib.tree.FieldNode(Opcodes.ACC_PUBLIC, "oneconfig$config", Type.getDescriptor(VigilanceConfig.class), null, null));
node.fields.add(new org.spongepowered.asm.lib.tree.FieldNode(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "oneconfig$file", Type.getDescriptor(File.class), null, null));