diff --git a/build.gradle b/build.gradle index ae33a796..5d86e689 100644 --- a/build.gradle +++ b/build.gradle @@ -73,7 +73,7 @@ repositories { url "https://repo.codemc.io/repository/maven-public/" } maven { - url 'http://dvs1.progwml6.com/files/maven' + url "http://maven.tterrag.com" } // maven { // url = "http://maven.bluexin.be/repository/snapshots/" @@ -92,6 +92,10 @@ dependencies { exclude module: "gson" exclude module: "commons-io" } + deobfCompile "com.enderio.core:EnderCore:1.12.2-+" + deobfCompile ("com.enderio:EnderIO:1.12.2-+") { + transitive = false + } compile "codechicken:ChickenASM:1.12-1.0.2.9" compile "epicsquid.mysticallib:mysticallib:1.12.2-+" compile "mezz.jei:jei_1.12.2:4.15.0.293" diff --git a/src/main/java/zone/rong/loliasm/common/modfixes/evilcraftcompat/mixins/EnderIORecipeManagerMixin.java b/src/main/java/zone/rong/loliasm/common/modfixes/evilcraftcompat/mixins/EnderIORecipeManagerMixin.java new file mode 100644 index 00000000..2170b51d --- /dev/null +++ b/src/main/java/zone/rong/loliasm/common/modfixes/evilcraftcompat/mixins/EnderIORecipeManagerMixin.java @@ -0,0 +1,19 @@ +package zone.rong.loliasm.common.modfixes.evilcraftcompat.mixins; + +import crazypants.enderio.base.recipe.*; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Pseudo; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Pseudo +@Mixin(targets = "org.cyclops.evilcraftcompat.modcompat.enderio.EnderIORecipeManager", remap = false) +public class EnderIORecipeManagerMixin { + + @SuppressWarnings("all") + @Redirect(method = "register", at = @At(value = "NEW", target = "crazypants/enderio/base/recipe/Recipe")) + private static Recipe resolveCorrectRecipeSignature(IRecipeInput recipeInput, int energyRequired, RecipeBonusType bonusType, RecipeOutput... output) { + return new Recipe(recipeInput, energyRequired, bonusType, RecipeLevel.IGNORE, output); + } + +} diff --git a/src/main/java/zone/rong/loliasm/config/LoliConfig.java b/src/main/java/zone/rong/loliasm/config/LoliConfig.java index c73e887d..7994ddf7 100644 --- a/src/main/java/zone/rong/loliasm/config/LoliConfig.java +++ b/src/main/java/zone/rong/loliasm/config/LoliConfig.java @@ -70,7 +70,7 @@ public boolean shouldSkipClass(Class clazz) { public boolean releaseSpriteFramesCache; public boolean optimizeSomeRendering, stripUnnecessaryLocalsInRenderHelper; public boolean quickerEnableUniversalBucketCheck, stripInstancedRandomFromSoundEventAccessor, classCaching, copyScreenshotToClipboard; - public boolean fixBlockIEBaseArrayIndexOutOfBoundsException, cleanupChickenASMClassHierarchyManager, optimizeAmuletRelatedFunctions, labelCanonicalization, skipCraftTweakerRecalculatingSearchTrees, bwmBlastingOilOptimization, optimizeQMDBeamRenderer; + public boolean fixBlockIEBaseArrayIndexOutOfBoundsException, cleanupChickenASMClassHierarchyManager, optimizeAmuletRelatedFunctions, labelCanonicalization, skipCraftTweakerRecalculatingSearchTrees, bwmBlastingOilOptimization, optimizeQMDBeamRenderer, repairEvilCraftEIOCompat; public boolean fixAmuletHolderCapability; public boolean fixFillBucketEventNullPointerException, fixTileEntityOnLoadCME, removeForgeSecurityManager, fasterEntitySpawnPreparation; public boolean sparkProfileEntireGameLoad, sparkProfileCoreModLoading, sparkProfileConstructionStage, sparkProfilePreInitializationStage, sparkProfileInitializationStage, sparkProfilePostInitializationStage, sparkProfileLoadCompleteStage, includeAllThreadsWhenProfiling; @@ -135,6 +135,7 @@ public void load() { skipCraftTweakerRecalculatingSearchTrees = getBoolean("skipCraftTweakerRecalculatingSearchTrees", "modfixes", "When CraftTweaker is installed, large modpacks tend to stall in the last stage of loading, when CraftTweaker inexplicably recalculates search trees. This option will be ignored when CraftTweaker isn't installed", true); bwmBlastingOilOptimization = getBoolean("bwmBlastingOilOptimization", "modfixes", "When Better with Mods is installed, optimize Blasting Oil related events. The original implementation harms server performance at any given moment. This option will be ignored when Better with Mods isn't installed", true); optimizeQMDBeamRenderer = getBoolean("optimizeQMDBeamRenderer", "modfixes", "When QMD is installed, optimize its BeamRenderer. The original implementation harms client performance heavily (takes ~5% of each tick time). This option will be ignored when QMD isn't installed", true); + repairEvilCraftEIOCompat = getBoolean("repairEvilCraftEIOCompat", "modfixes", "When EvilCraft Compat + EnderIO is installed, repair the compatibility module", true); fixAmuletHolderCapability = getBoolean("fixAmuletHolderCapability", "capability", "Fixes Astral Sorcery applying AmuletHolderCapability to large amount of ItemStacks when it isn't needed. This option will be ignored when Astral Sorcery isn't installed", true); diff --git a/src/main/java/zone/rong/loliasm/core/LoliMixinLoader.java b/src/main/java/zone/rong/loliasm/core/LoliMixinLoader.java index 6e3e9c3c..55a2fd74 100644 --- a/src/main/java/zone/rong/loliasm/core/LoliMixinLoader.java +++ b/src/main/java/zone/rong/loliasm/core/LoliMixinLoader.java @@ -25,6 +25,9 @@ public class LoliMixinLoader { if (Loader.isModLoaded("jei") && LoliConfig.instance.optimizeAndCacheJEISearchTrees && !Loader.isModLoaded("jecharacters") || !JechConfig.enableJEI) { Mixins.addConfiguration("mixins.modfixes_jei.json"); } + if (Loader.isModLoaded("evilcraftcompat") && LoliConfig.instance.repairEvilCraftEIOCompat) { + Mixins.addConfiguration("mixins.modfixes_evilcraftcompat.json"); + } } } diff --git a/src/main/resources/mixins.modfixes_evilcraftcompat.json b/src/main/resources/mixins.modfixes_evilcraftcompat.json new file mode 100644 index 00000000..b4642cec --- /dev/null +++ b/src/main/resources/mixins.modfixes_evilcraftcompat.json @@ -0,0 +1,13 @@ +{ + "package": "zone.rong.loliasm.common.modfixes.evilcraftcompat.mixins", + "refmap": "mixins.loliasm.refmap.json", + "target": "@env(DEFAULT)", + "minVersion": "0.8", + "compatibilityLevel": "JAVA_8", + "injectors": { + "defaultRequire": 1 + }, + "mixins": [ + "EnderIORecipeManagerMixin" + ] +} \ No newline at end of file