mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-13 05:27:28 +00:00
ModInfoGenerator back to ASM
This commit is contained in:
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;
|
||||
|
||||
|
||||
+3
@@ -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();
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.dev.spacecore;
|
||||
|
||||
import com.spacechase0.minecraft.spacecore.mcp.ModInfoGenerator;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(value = ModInfoGenerator.class,
|
||||
remap = false)
|
||||
public abstract class ModInfoGeneratorMixin {
|
||||
@Inject(method = "generate",
|
||||
at = @At("HEAD"),
|
||||
cancellable = true,
|
||||
require = 1)
|
||||
private static void noGenerate(CallbackInfo ci) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user