diff --git a/README.md b/README.md index 9355afd..9b4e5a9 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ If you are still using 0.1.0 Cleanroom, use 0.5.4. But that's not recommended. * Integrated Proxy * Thaumic Fixes * Erebus Fix +* Uncrafting Blacklist ## Note Add + to start of the file if it's not there. \ No newline at end of file diff --git a/src/main/java/com/cleanroommc/fugue/common/FugueLateMixinLoader.java b/src/main/java/com/cleanroommc/fugue/common/FugueLateMixinLoader.java index 86d7971..4c507eb 100644 --- a/src/main/java/com/cleanroommc/fugue/common/FugueLateMixinLoader.java +++ b/src/main/java/com/cleanroommc/fugue/common/FugueLateMixinLoader.java @@ -60,6 +60,9 @@ public List getMixinConfigs() { if (FugueConfig.modPatchConfig.enableErebusFixPatch && Loader.isModLoaded("erebusfix")) { configs.add("mixins.erebusfix.json"); } + if (FugueConfig.modPatchConfig.enableUncraftingBlacklist && Loader.isModLoaded("uncrafting_blacklist")) { + configs.add("mixins.uncraftingblacklist.json"); + } return configs; } } diff --git a/src/main/java/com/cleanroommc/fugue/common/TransformerHelper.java b/src/main/java/com/cleanroommc/fugue/common/TransformerHelper.java index a762964..348108e 100644 --- a/src/main/java/com/cleanroommc/fugue/common/TransformerHelper.java +++ b/src/main/java/com/cleanroommc/fugue/common/TransformerHelper.java @@ -19,7 +19,7 @@ import com.cleanroommc.fugue.transformer.openmodlib.InjectorMethodVisitorTransformer; import com.cleanroommc.fugue.transformer.openmodlib.PlayerRendererHookVisitorTransformer; import com.cleanroommc.fugue.transformer.subaquatic.PluginEntityTransformer; -import com.cleanroommc.fugue.transformer.thaumicfixes.ThaumicFixesLoadingPluginTransformer; +import com.cleanroommc.fugue.transformer.universal.RemoveMixinInitFromCotrTransformer; import com.cleanroommc.fugue.transformer.tickcentral.*; import com.cleanroommc.fugue.transformer.universal.*; import org.spongepowered.asm.mixin.transformer.Config; @@ -173,11 +173,15 @@ public static void registerTransformers() { if (FugueConfig.modPatchConfig.enableIntegratedProxyPatch) { TransformerDelegate.registerExplicitTransformerByInstance(new MixinLoaderTransformer(), "com.shblock.integrated_proxy.mixin.MixinLoader"); } + RemoveMixinInitFromCotrTransformer instance = new RemoveMixinInitFromCotrTransformer(); if (FugueConfig.modPatchConfig.enableThaumicFixesPatch) { - TransformerDelegate.registerExplicitTransformerByInstance(new ThaumicFixesLoadingPluginTransformer(), "com.seriouscreeper.thaumicfixes.core.ThaumicFixesLoadingPlugin"); + TransformerDelegate.registerExplicitTransformerByInstance(instance, "com.seriouscreeper.thaumicfixes.core.ThaumicFixesLoadingPlugin"); } if (FugueConfig.modPatchConfig.enableErebusFixPatch) { - TransformerDelegate.registerExplicitTransformerByInstance(new ThaumicFixesLoadingPluginTransformer(), "noobanidus.mods.erebusfix.core.EFLoadingPlugin"); + TransformerDelegate.registerExplicitTransformerByInstance(instance, "noobanidus.mods.erebusfix.core.EFLoadingPlugin"); + } + if (FugueConfig.modPatchConfig.enableUncraftingBlacklist) { + TransformerDelegate.registerExplicitTransformerByInstance(instance, "doomanidus.mods.uncraftingblacklist.core.UBLoadingPlugin"); } if (FugueConfig.getCodeSourcePatchTargets.length > 0) { diff --git a/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java b/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java index 559b6e3..d0083df 100644 --- a/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java +++ b/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java @@ -135,4 +135,6 @@ public class ModPatchConfig { public boolean enableThaumicFixesPatch = true; @Config.Name("Enable Erebus Fix Patch") public boolean enableErebusFixPatch = true; + @Config.Name("Enable Uncrafting Blacklist Patch") + public boolean enableUncraftingBlacklist = true; } diff --git a/src/main/java/com/cleanroommc/fugue/transformer/thaumicfixes/ThaumicFixesLoadingPluginTransformer.java b/src/main/java/com/cleanroommc/fugue/transformer/universal/RemoveMixinInitFromCotrTransformer.java similarity index 88% rename from src/main/java/com/cleanroommc/fugue/transformer/thaumicfixes/ThaumicFixesLoadingPluginTransformer.java rename to src/main/java/com/cleanroommc/fugue/transformer/universal/RemoveMixinInitFromCotrTransformer.java index 18dd36a..c382394 100644 --- a/src/main/java/com/cleanroommc/fugue/transformer/thaumicfixes/ThaumicFixesLoadingPluginTransformer.java +++ b/src/main/java/com/cleanroommc/fugue/transformer/universal/RemoveMixinInitFromCotrTransformer.java @@ -1,4 +1,4 @@ -package com.cleanroommc.fugue.transformer.thaumicfixes; +package com.cleanroommc.fugue.transformer.universal; import com.cleanroommc.fugue.common.Fugue; import javassist.CannotCompileException; @@ -10,7 +10,7 @@ import java.io.ByteArrayInputStream; -public class ThaumicFixesLoadingPluginTransformer implements IExplicitTransformer { +public class RemoveMixinInitFromCotrTransformer implements IExplicitTransformer { @Override public byte[] transform(byte[] bytes) { try {