aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLlamaLad7 <l3gomindstorms@gmail.com>2023-05-21 08:19:52 +0100
committerGitHub <noreply@github.com>2023-05-21 08:19:52 +0100
commitf5b35cf7590e5e0d3f5b604216e1ba4a3d641c9d (patch)
tree7433829f6d10ce70e258fa8324a2b5f86e808555
parentc79f47c7dcd4cd2b0cc9266c0dd0b784f647bfa1 (diff)
downloadspark-f5b35cf7590e5e0d3f5b604216e1ba4a3d641c9d.tar.gz
spark-f5b35cf7590e5e0d3f5b604216e1ba4a3d641c9d.tar.bz2
spark-f5b35cf7590e5e0d3f5b604216e1ba4a3d641c9d.zip
Ignore empty mixin packages in FabricClassSourceLookup (#330)
-rw-r--r--spark-fabric/src/main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java3
1 files changed, 2 insertions, 1 deletions
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);
}
}