diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-07-04 15:44:18 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-07-04 15:44:18 +0200 |
commit | 3cc47add647f4bf24443a7761e7db52fbe4a148a (patch) | |
tree | e26e4892aa08bc034a18b2a967e5d4d1f99c54b1 | |
parent | 76c85b82bd0dba4dfdffc136a4d4f8cb45cb45f3 (diff) | |
download | OneConfig-3cc47add647f4bf24443a7761e7db52fbe4a148a.tar.gz OneConfig-3cc47add647f4bf24443a7761e7db52fbe4a148a.tar.bz2 OneConfig-3cc47add647f4bf24443a7761e7db52fbe4a148a.zip |
fix
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gradle.properties b/gradle.properties index 5441beb..2495400 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_name = OneConfig mod_id = oneconfig -mod_version = 0.1.0-alpha45 +mod_version = 0.1.0-alpha46 essential.defaults.loom=0 diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java b/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java index bc9dc7b..6999d60 100644 --- a/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java +++ b/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java @@ -60,7 +60,7 @@ public class OneConfigMixinPlugin implements IMixinConfigPlugin { */ private void transform(ClassNode node) { if (!node.interfaces.contains("cc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilantAccessor")) { - node.fields.add(new FieldNode(Opcodes.ACC_PUBLIC, "oneconfig$config", "Lcc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig;", null, null)); + node.fields.add(new FieldNode(Opcodes.ACC_PUBLIC, "oneconfig$config", "Lcc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig;", null, null)); node.fields.add(new FieldNode(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "oneconfig$file", Type.getDescriptor(File.class), null, null)); node.interfaces.add("cc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilantAccessor"); @@ -80,14 +80,14 @@ public class OneConfigMixinPlugin implements IMixinConfigPlugin { methodNode2.instructions.add(labelNode2); methodNode2.instructions.add(new LineNumberNode(15636436, labelNode2)); methodNode2.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0)); - methodNode2.instructions.add(new FieldInsnNode(Opcodes.GETFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig;")); + methodNode2.instructions.add(new FieldInsnNode(Opcodes.GETFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig;")); methodNode2.instructions.add(new JumpInsnNode(Opcodes.IFNULL, labelNode4)); methodNode2.instructions.add(labelNode3); methodNode2.instructions.add(new LineNumberNode(15636437, labelNode3)); methodNode2.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0)); - methodNode2.instructions.add(new FieldInsnNode(Opcodes.GETFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig;")); + methodNode2.instructions.add(new FieldInsnNode(Opcodes.GETFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig;")); methodNode2.instructions.add(new VarInsnNode(Opcodes.ALOAD, 1)); methodNode2.instructions.add(new VarInsnNode(Opcodes.ALOAD, 2)); methodNode2.instructions.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "cc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig", "addDependency", "(Lgg/essential/vigilance/data/PropertyData;Lgg/essential/vigilance/data/PropertyData;)V", false)); @@ -104,8 +104,8 @@ public class OneConfigMixinPlugin implements IMixinConfigPlugin { list.add(new VarInsnNode(Opcodes.ALOAD, 0)); list.add(new VarInsnNode(Opcodes.ALOAD, 0)); list.add(new FieldInsnNode(Opcodes.GETFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$file", Type.getDescriptor(File.class))); - list.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "cc/polyfrost/oneconfig/internal/plugin/hooks/VigilantHook", "returnNewConfig", "(Lgg/essential/vigilance/Vigilant;Ljava/io/File;)Lcc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig;", false)); - list.add(new FieldInsnNode(Opcodes.PUTFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig;")); + list.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "cc/polyfrost/oneconfig/internal/plugin/hooks/VigilantHook", "returnNewConfig", "(Lgg/essential/vigilance/Vigilant;Ljava/io/File;)Lcc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig;", false)); + list.add(new FieldInsnNode(Opcodes.PUTFIELD, "gg/essential/vigilance/Vigilant", "oneconfig$config", "Lcc/polyfrost/oneconfig/internal/config/compatibility/vigilance/VigilanceConfig;")); method.instructions.insertBefore(method.instructions.getLast().getPrevious(), list); } else if (method.name.equals("addDependency") && method.desc.equals("(Lgg/essential/vigilance/data/PropertyData;Lgg/essential/vigilance/data/PropertyData;)V")) { InsnList list = new InsnList(); |