diff --git a/build.gradle b/build.gradle index a4748be..7fb1fb7 100644 --- a/build.gradle +++ b/build.gradle @@ -214,6 +214,9 @@ dependencies { //In Control! compileOnly(fg.deobf("curse.maven:incontrol-257356:3101719")) + //MoreRefinedStorage + compileOnly(fg.deobf("curse.maven:mrs-631058:3818846")) + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.24' // Mixin and it's common libraries diff --git a/gradle.properties b/gradle.properties index 857deea..9d81532 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ mappings_version=39-1.12 mod_id=fugue mod_name=Fugue mod_main_class=Fugue -mod_version=0.15.2 +mod_version=0.15.3 mod_base_package=com.cleanroommc.fugue mod_authors=kappa_maintainer mod_description=A mod that patch dead mods for Cleanroom diff --git a/src/main/java/com/cleanroommc/fugue/common/FugueMixinConfigPlugin.java b/src/main/java/com/cleanroommc/fugue/common/FugueMixinConfigPlugin.java index 426586f..070ca98 100644 --- a/src/main/java/com/cleanroommc/fugue/common/FugueMixinConfigPlugin.java +++ b/src/main/java/com/cleanroommc/fugue/common/FugueMixinConfigPlugin.java @@ -50,6 +50,7 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { case "mage" -> Loader.isModLoaded("mage") && FugueConfig.modPatchConfig.enableMage; case "extrautils2" -> Loader.isModLoaded("extrautils2") && FugueConfig.modPatchConfig.enableExtraUtilities; case "incontrol" -> Loader.isModLoaded("incontrol") && FugueConfig.modPatchConfig.enableInControl; + case "refinedstorage" -> Loader.isModLoaded("refinedstorage") && FugueConfig.modPatchConfig.enableMoreRefinedStorage && Fugue.isModNewerThan("refinedstorage", "2.0.0"); default -> true; }; } diff --git a/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java b/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java index b531208..965bbd6 100644 --- a/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java +++ b/src/main/java/com/cleanroommc/fugue/config/ModPatchConfig.java @@ -95,4 +95,6 @@ public class ModPatchConfig { public boolean enableExtraUtilities = true; @Config.Name("Enable In Control! Patch") public boolean enableInControl = true; + @Config.Name("Enable More Refined Storage Patch") + public boolean enableMoreRefinedStorage = true; } diff --git a/src/main/java/com/cleanroommc/fugue/mixin/refinedstorage/OperatorMixin.java b/src/main/java/com/cleanroommc/fugue/mixin/refinedstorage/OperatorMixin.java new file mode 100644 index 0000000..9930545 --- /dev/null +++ b/src/main/java/com/cleanroommc/fugue/mixin/refinedstorage/OperatorMixin.java @@ -0,0 +1,13 @@ +package com.cleanroommc.fugue.mixin.refinedstorage; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArg; + +@Mixin(targets = "com.raoulvdberge.refinedstorage.apiimpl.network.NetworkNodeGraph$Operator") +public class OperatorMixin { + @ModifyArg(method = "", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/objects/ObjectOpenHashSet;(IF)V"), index = 1) + private float modify1(float old) { + return 0.75F; + } +} diff --git a/src/main/resources/fugue.mixin.mod.json b/src/main/resources/fugue.mixin.mod.json index 6440dbe..05ef00a 100644 --- a/src/main/resources/fugue.mixin.mod.json +++ b/src/main/resources/fugue.mixin.mod.json @@ -23,6 +23,7 @@ "minecraftmultipartcbe.ASMMixinCompilerMixin", "minecraftmultipartcbe.StackAnalyserMixin", "projectred_core.WirePropagatorMixin", + "refinedstorage.OperatorMixin", "solarflux.INetworkSFMixin", "solarflux.SolarFluxMixin", "subaquatic.IBubbleColumnMixin",