From 06b794dcea806150770fb88d43e366a3496a9d0f Mon Sep 17 00:00:00 2001 From: lucko Date: Sat, 28 Jan 2023 11:07:45 +0000 Subject: Stream live data to the viewer using WebSockets (#294) --- .../main/java/me/lucko/spark/fabric/plugin/FabricSparkMixinPlugin.java | 1 + .../src/main/java/me/lucko/spark/fabric/smap/SourceDebugCache.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'spark-fabric/src/main/java/me/lucko/spark') diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricSparkMixinPlugin.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricSparkMixinPlugin.java index cfc8c95..8b7e138 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricSparkMixinPlugin.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricSparkMixinPlugin.java @@ -21,6 +21,7 @@ package me.lucko.spark.fabric.plugin; import me.lucko.spark.fabric.smap.SourceDebugCache; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.objectweb.asm.tree.ClassNode; diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/smap/SourceDebugCache.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/smap/SourceDebugCache.java index 88adae6..6af2a79 100644 --- a/spark-fabric/src/main/java/me/lucko/spark/fabric/smap/SourceDebugCache.java +++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/smap/SourceDebugCache.java @@ -25,7 +25,6 @@ import org.spongepowered.asm.service.IClassBytecodeProvider; import org.spongepowered.asm.service.MixinService; import java.util.Map; -import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; /** -- cgit From 0177865737da4067927851ef5b76407388b7e869 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 29 Jan 2023 11:00:12 +0000 Subject: Update fabric/forge versions --- spark-fabric/build.gradle | 8 ++++---- .../main/java/me/lucko/spark/fabric/FabricClassSourceLookup.java | 5 ++--- spark-forge/build.gradle | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'spark-fabric/src/main/java/me/lucko/spark') diff --git a/spark-fabric/build.gradle b/spark-fabric/build.gradle index 8b6d030..0421f68 100644 --- a/spark-fabric/build.gradle +++ b/spark-fabric/build.gradle @@ -1,7 +1,7 @@ import net.fabricmc.loom.task.RemapJarTask plugins { - id 'fabric-loom' version '0.12.+' + id 'fabric-loom' version '1.1-SNAPSHOT' id 'com.github.johnrengelman.shadow' version '7.0.0' } @@ -29,8 +29,8 @@ configurations { dependencies { // https://modmuss50.me/fabric.html minecraft 'com.mojang:minecraft:1.19.3' - mappings 'net.fabricmc:yarn:1.19.3+build.2:v2' - modImplementation 'net.fabricmc:fabric-loader:0.14.11' + mappings 'net.fabricmc:yarn:1.19.3+build.5:v2' + modImplementation 'net.fabricmc:fabric-loader:0.14.13' Set apiModules = [ "fabric-api-base", @@ -40,7 +40,7 @@ dependencies { // Add each module as a dependency apiModules.forEach { - modImplementation(fabricApi.module(it, '0.68.1+1.19.3')) + modImplementation(fabricApi.module(it, '0.73.0+1.19.3')) } include(modImplementation('me.lucko:fabric-permissions-api:0.1-SNAPSHOT')) 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 51834fc..0ad05b9 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 @@ -31,7 +31,6 @@ import me.lucko.spark.fabric.smap.SourceMapProvider; import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.ModContainer; -import org.checkerframework.checker.nullness.qual.Nullable; import org.objectweb.asm.Type; import org.spongepowered.asm.mixin.FabricUtil; import org.spongepowered.asm.mixin.extensibility.IMixinConfig; @@ -73,7 +72,7 @@ public class FabricClassSourceLookup extends ClassSourceLookup.ByCodeSource { } @Override - public @Nullable String identify(MethodCall methodCall) throws Exception { + public String identify(MethodCall methodCall) throws Exception { String className = methodCall.getClassName(); String methodName = methodCall.getMethodName(); String methodDesc = methodCall.getMethodDescriptor(); @@ -99,7 +98,7 @@ public class FabricClassSourceLookup extends ClassSourceLookup.ByCodeSource { } @Override - public @Nullable String identify(MethodCallByLine methodCall) throws Exception { + public String identify(MethodCallByLine methodCall) throws Exception { String className = methodCall.getClassName(); String methodName = methodCall.getMethodName(); int lineNumber = methodCall.getLineNumber(); diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index ef20815..47c4c22 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -30,7 +30,7 @@ configurations { } dependencies { - minecraft 'net.minecraftforge:forge:1.19.3-44.0.4' + minecraft 'net.minecraftforge:forge:1.19.3-44.1.0' shade project(':spark-common') } -- cgit 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/spark') 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