Skip to content

Commit 40ec3f1

Browse files
committed
Do not run Decorative Blocks fix without Decorative Blocks installed
🤦‍♂️
1 parent ad35fc5 commit 40ec3f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fabric/src/main/java/org/embeddedt/modernfix/fabric/modfixs/DecorativeBlocksFix.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.embeddedt.modernfix.fabric.modfixs;
22

3+
import net.fabricmc.loader.api.FabricLoader;
34
import net.minecraft.client.KeyMapping;
45
import org.embeddedt.modernfix.util.CommonModUtil;
56

@@ -8,6 +9,8 @@
89

910
public class DecorativeBlocksFix {
1011
public static void fix() {
12+
if(!FabricLoader.getInstance().isModLoaded("decorative_blocks"))
13+
return;
1114
CommonModUtil.runWithoutCrash(() -> {
1215
Class<?> decorativeBlocksSetup = Class.forName("lilypuree.decorative_blocks.client.ClientSetup");
1316
Field keybindField = decorativeBlocksSetup.getDeclaredField("switchItemState");

0 commit comments

Comments
 (0)