diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinOptifineConfig.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinOptifineConfig.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinOptifineConfig.java new file mode 100644 index 000000000..97b20f19a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinOptifineConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.mixins.transformers; + +import at.hannibal2.skyhanni.features.mining.MiningCommissionsBlocksColor; +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.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Pseudo +@Mixin(targets = "Config", remap = false) +public class MixinOptifineConfig { + + @Inject(method = {"isConnectedTextures", "isConnectedTexturesFancy"}, at = @At("HEAD"), cancellable = true) + private static void isConnectedTextures(CallbackInfoReturnable<Boolean> cir) { + if (MiningCommissionsBlocksColor.INSTANCE.getActive()) cir.setReturnValue(false); + } +} |