diff options
| author | miozune <miozune@gmail.com> | 2023-01-23 01:44:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-22 17:44:24 +0100 |
| commit | a5064b298efd9f0df2a39b225f7f42ba55dea9e4 (patch) | |
| tree | 53f2895fb37a04565d30f24731d3828f24d6b050 /src/main/java/com | |
| parent | e8c4263f04632d505fbb5828b1bd5e9b9f825ace (diff) | |
| download | GT5-Unofficial-a5064b298efd9f0df2a39b225f7f42ba55dea9e4.tar.gz GT5-Unofficial-a5064b298efd9f0df2a39b225f7f42ba55dea9e4.tar.bz2 GT5-Unofficial-a5064b298efd9f0df2a39b225f7f42ba55dea9e4.zip | |
Remove GT ASM (#271)
* Remove GT ASM
* Put into constructor
Former-commit-id: 4324bf86a3e8e35967f2e8e6cc6c4041a49d5495
Diffstat (limited to 'src/main/java/com')
3 files changed, 7 insertions, 34 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java index c09bb3e77e..331dc32534 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCore.java @@ -62,7 +62,7 @@ public class BWCore extends DummyModContainer { shouldTransform[0] = ConfigHandler.enabledPatches[0]; shouldTransform[1] = ConfigHandler.enabledPatches[1]; shouldTransform[3] = ConfigHandler.enabledPatches[3]; - shouldTransform[4] = true; + shouldTransform[4] = false; shouldTransform[5] = ConfigHandler.enabledPatches[5]; shouldTransform[6] = ConfigHandler.enabledPatches[6]; // shouldTransform[6] = true; @@ -78,7 +78,6 @@ public class BWCore extends DummyModContainer { ret.add(new DefaultArtifactVersion("Thaumcraft", true)); ret.add(new DefaultArtifactVersion("miscutils", true)); ret.add(new DefaultArtifactVersion("RWG", true)); - ret.add(new DefaultArtifactVersion("gregtech", true)); ret.add(new DefaultArtifactVersion(MainMod.MOD_ID, true)); ret.add(new DefaultArtifactVersion(BartWorksCrossmod.MOD_ID, true)); return ret; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java index 5fdace3319..1120323d7c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/ASM/BWCoreTransformer.java @@ -37,7 +37,7 @@ public class BWCoreTransformer implements IClassTransformer { "REMVOING CREATURES FROM LAST MILLENIUM (EXU)", "PATCHING GLOBAL RENDERER FOR USE WITH MY GALACTIC DIMS", "PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION", - "PLACING MY GLASS-BLOCK RUNNABLE INTO THE GT_API", + "[UNUSED] PLACING MY GLASS-BLOCK RUNNABLE INTO THE GT_API", "DUCTTAPING RWG WORLDEN FAILS", "PATCHING CRAFTING MANAGER FOR CACHING RECIPES" // "REMOVING 12% BONUS OUTPUTS FROM GT++ SIFTER" @@ -293,37 +293,7 @@ public class BWCoreTransformer implements IClassTransformer { } } case 4: { - BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]); - String name_deObfs = "<clinit>"; - for (MethodNode toPatch : methods) { - if (ASMUtils.isCorrectMethod(toPatch, name_deObfs) && (toPatch.access & ACC_STATIC) != 0) { - BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!"); - InsnList nu = new InsnList(); - LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()}; - for (int j = 0; j < 2; j++) { - nu.add(toPatch.instructions.get(j)); - } - nu.add(new FieldInsnNode( - GETSTATIC, "gregtech/api/GregTech_API", "sBeforeGTPreload", "Ljava/util/List;")); - nu.add(new TypeInsnNode( - NEW, "com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload")); - nu.add(new InsnNode(DUP)); - nu.add(new MethodInsnNode( - INVOKESPECIAL, - "com/github/bartimaeusnek/bartworks/common/loaders/BeforeGTPreload", - "<init>", - "()V", - false)); - nu.add(new MethodInsnNode( - INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", true)); - nu.add(new InsnNode(POP)); - for (int j = 2; j < toPatch.instructions.size(); j++) { - nu.add(toPatch.instructions.get(j)); - } - toPatch.instructions = nu; - break scase; - } - } + break; } case 5: { BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 13bff6e0d6..3dc2ef474e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -92,6 +92,10 @@ public final class MainMod { public static BW_Network BW_Network_instance = new BW_Network(); + public MainMod() { + GregTech_API.sBeforeGTPreload.add(new BeforeGTPreload()); + } + @Mod.EventHandler public void preInit(FMLPreInitializationEvent preinit) { |
