chore: remove dashloader compat

This commit is contained in:
Johannes Frohnmeyer 2024-05-04 20:23:29 +02:00
parent 1d518d748b
commit 57e2fb4b7a
Signed by: Johannes
GPG Key ID: E76429612C2929F4
5 changed files with 2 additions and 42 deletions

View File

@ -16,13 +16,6 @@ repositories {
includeGroup("io.vram")
}
}
maven("https://notalpha.dev/maven/releases") {
name = "DashLoader"
content {
includeGroup("dev.notalpha")
includeGroup("dev.quantumfusion")
}
}
maven("https://api.modrinth.com/maven") {
name = "Modrinth"
content {
@ -70,8 +63,7 @@ dependencies {
modLocalRuntime("com.terraformersmc:modmenu:$modmenuVersion", nofabric)
modClientCompileOnly("com.terraformersmc:modmenu:$modmenuVersion", nofabric)
modClientCompileOnly("io.vram:frex-fabric:20.0.+")
modClientCompileOnly("dev.notalpha:dashloader:5.0.0-beta.1+1.20.0")
modClientCompileOnly("io.vram:frex-fabric:20.2.+")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
@ -79,11 +71,8 @@ dependencies {
annotationProcessor("io.gitlab.jfronny:commons-serialize-generator:$muscriptVersion")
// Canvas for FREX testing
// modClientRuntimeOnly("io.vram:canvas-fabric:20.0.+")
//modClientRuntimeOnly("io.vram:canvas-fabric:20.2.+")
// Sodium for debugging
modClientRuntimeOnly("maven.modrinth:sodium:mc1.20.6-0.5.8")
// DashLoader "compatibility"
// modClientRuntimeOnly("dev.notalpha:dashloader:5.0.0-beta.1+1.20.0")
}

View File

@ -52,7 +52,6 @@ public class RespackoptsClient implements ClientModInitializer, SaveHook {
if (args.flagResourcesForReload()) {
forcePackReload = true;
DashLoaderCompat.requestForceReload();
}
List<CompletableFuture<Void>> futures = new ArrayList<>();
if (args.reloadResourcesImmediately()) {
@ -66,7 +65,6 @@ public class RespackoptsClient implements ClientModInitializer, SaveHook {
public static CompletableFuture<Void> forceReloadResources() {
forcePackReload = true;
DashLoaderCompat.requestForceReload();
if (RespackoptsConfig.debugLogs) Respackopts.LOGGER.info("Forcing resource reload");
return CompletableFuture.allOf(MinecraftClient.getInstance().reloadResources());
}

View File

@ -1,24 +0,0 @@
package io.gitlab.jfronny.respackopts.integration;
import dev.notalpha.dashloader.client.DashLoaderClient;
import io.gitlab.jfronny.respackopts.Respackopts;
import io.gitlab.jfronny.respackopts.RespackoptsConfig;
import net.fabricmc.loader.api.FabricLoader;
public class DashLoaderCompat {
public static void requestForceReload() {
if (!FabricLoader.getInstance().isModLoaded("dashloader"))
return;
if (!RespackoptsConfig.dashloaderCompat)
return;
try {
if (RespackoptsConfig.debugLogs)
Respackopts.LOGGER.info("Removing DashCache to force dashloader to reload");
DashLoaderClient.CACHE.remove();
DashLoaderClient.NEEDS_RELOAD = true;
} catch (Throwable e) {
Respackopts.LOGGER.error("Failed to remove dashloader data, try disabling dashloaderCompat if this keeps happening", e);
}
}
}

View File

@ -16,7 +16,6 @@ public class RespackoptsConfig implements JfCustomConfig {
public static boolean debugCommands = false;
public static boolean debugLogs = false;
public static boolean ioLogs = false;
public static boolean dashloaderCompat = true;
public static ScanState scanState = ScanState.NONE;
public static ConfigInstance configInstance = null;
@ -40,7 +39,6 @@ public class RespackoptsConfig implements JfCustomConfig {
.value("debugCommands", debugCommands, () -> debugCommands, v -> debugCommands = v)
.value("debugLogs", debugLogs, () -> debugLogs, v -> debugLogs = v)
.value("ioLogs", ioLogs, () -> ioLogs, v -> ioLogs = v)
.value("dashloaderCompat", dashloaderCompat, () -> dashloaderCompat, v -> dashloaderCompat = v)
// Not using Respackopts.FALLBACK_CONF_DIR to avoid premature initialization with libjf-unsafe and libjf-config-reflect
.setPath(dir.resolve("_respackopts.conf"))
.referenceConfig(() -> {

View File

@ -8,7 +8,6 @@
"respackopts.jfconfig.debugLogs.tooltip": "Logs some information useful for debugging packs or the mod itself. (requires restart)",
"respackopts.jfconfig.ioLogs": "IO Logs",
"respackopts.jfconfig.ioLogs.tooltip": "Log every resource access. WARNING: This WILL result in giant log files! (requires restart)",
"respackopts.jfconfig.dashloaderCompat": "Dashloader compatibility",
"respackopts.invalid": "Invalid value",
"respackopts.dumpSucceeded": "Successfully dumped the resource to %s",
"respackopts.dumpFailed": "Could not dump the requested resource, look at your log for details",