aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-09-20 21:46:47 +0200
committerGitHub <noreply@github.com>2024-09-20 21:46:47 +0200
commitf3a70ae089fed6172b1526c38e1fe006c1c89974 (patch)
tree9f5f257a12896e9adc45e1eb3085992b973c7df9 /src/main
parenta267da2c57fdc765a540540505db8c9c6ed66231 (diff)
downloadskyhanni-f3a70ae089fed6172b1526c38e1fe006c1c89974.tar.gz
skyhanni-f3a70ae089fed6172b1526c38e1fe006c1c89974.tar.bz2
skyhanni-f3a70ae089fed6172b1526c38e1fe006c1c89974.zip
Fix: Mining Commission Blocks Color and Connected Textures (#2553)
Co-authored-by: ItsEmpa <itsempa@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinOptifineConfig.java18
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);
+ }
+}