mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-28 22:48:54 +00:00
ModInfoGenerator back to ASM
This commit is contained in:
5 files changed
+7
-34
No files matched your search
+1
-1
@@ -69,7 +69,7 @@ mixinPlugin = mixin.plugin.MixinPlugin
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
mixinsPackage = mixin.mixins
|
||||
# Specify a preinit mixin here. Preinit mixins should be used very rarely, if at all, so this mixin config will not be managed by the buildscript, only included.
|
||||
mixinPreinitConfig = mixins.preinit.json
|
||||
mixinPreinitConfig =
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.7.11",
|
||||
"package": "com.falsepattern.endlessids.mixin.mixins",
|
||||
"refmap": "mixins.endlessids.refmap.json",
|
||||
"target": "@env(PREINIT)",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"common.dev.spacecore.ModInfoGeneratorMixin"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user