ModInfoGenerator back to ASM

This commit is contained in:
FalsePattern committed 2022-07-22 20:09:31 +02:00
1 parent 582a83a7a6
commit 54f216922f
5 files changed
+7 -34

No files matched your search

@@ -9,11 +9,12 @@ import java.util.HashMap;
import java.util.Map;
public enum ClassEdit {
ChunkProviderSuperPatcher(new ChunkProviderSuperPatcher()),
DragonAPIModList(new DragonAPIModList(), "Reika.DragonAPI.ModList"),
FmlRegistry(new FmlRegistry(),
"cpw.mods.fml.common.registry.GameData",
"cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry"),
ChunkProviderSuperPatcher(new ChunkProviderSuperPatcher()),
DragonAPIModList(new DragonAPIModList(), "Reika.DragonAPI.ModList");
SpaceCoreModInfoGenerator(new SpaceCoreModInfoGenerator(), "com.spacechase0.minecraft.spacecore.mcp.ModInfoGenerator");
private static final Map<String, ClassEdit> editMap;
@@ -9,6 +9,9 @@ import org.objectweb.asm.tree.InsnNode;
public class SpaceCoreModInfoGenerator implements IClassNodeTransformer {
@Override
public void transform(final ClassNode cn, final boolean obfuscated) {
if (obfuscated) {
return;
}
for (val method: cn.methods) {
if (method.name.equals("generate")) {
val iterator = method.instructions.iterator();