Skip to content

Commit

Permalink
Patch Uncrafting Blacklist (moved from MixinFixer)
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Nov 18, 2024
1 parent 3cc8859 commit 5d17392
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public List<String> 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 {
Expand Down

0 comments on commit 5d17392

Please sign in to comment.