From f5b35cf7590e5e0d3f5b604216e1ba4a3d641c9d Mon Sep 17 00:00:00 2001 From: LlamaLad7 Date: Sun, 21 May 2023 08:19:52 +0100 Subject: Ignore empty mixin packages in FabricClassSourceLookup (#330) --- .../src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spark-fabric/src/main/java/me/lucko') diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java index 0ad05b9..ef22d9c 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java @@ -142,7 +142,8 @@ public class FabricClassSourceLookup extends ClassSourceLookup.ByCodeSource { private static String modIdFromMixinClass(String mixinClassName) { for (Config config : MixinUtils.getMixinConfigs().values()) { IMixinConfig mixinConfig = config.getConfig(); - if (mixinClassName.startsWith(mixinConfig.getMixinPackage())) { + String mixinPackage = mixinConfig.getMixinPackage(); + if (!mixinPackage.isEmpty() && mixinClassName.startsWith(mixinPackage)) { return mixinConfig.getDecoration(FabricUtil.KEY_MOD_ID); } } -- cgit