feat: Recursive deploader and mod dep loading

This commit is contained in:
FalsePattern committed 2025-11-13 00:22:29 +01:00
1 parent 6777344f03
commit b95c54a623
8 files changed
+280 -103

No files matched your search

@@ -36,10 +36,12 @@ import lombok.val;
import net.minecraft.launchwrapper.IClassTransformer;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex;
import cpw.mods.fml.relauncher.Side;
import java.util.List;
import java.util.Map;
@@ -57,6 +59,7 @@ public class CoreLoadingPlugin implements IFMLLoadingPlugin {
static {
PreShare.initDevState(Launch.classLoader.findResource("net/minecraft/world/World.class") != null);
PreShare.initClientState(FMLLaunchHandler.side() == Side.CLIENT);
LetsEncryptHelper.replaceSSLContext();
FPLog.LOG.info("Removing skill issues...");
try {
@@ -22,20 +22,27 @@
package com.falsepattern.lib.internal.asm;
import lombok.Getter;
public class PreShare {
private static volatile boolean devEnv = false;
private static volatile boolean inited = false;
private static volatile int devEnv = -1;
private static volatile int client = -1;
public static synchronized void initDevState(boolean state) {
if (inited) {
if (devEnv >= 0) {
return;
}
inited = true;
devEnv = state;
devEnv = state ? 1 : 0;
}
public static synchronized void initClientState(boolean state) {
if (client >= 0) {
return;
}
client = state ? 1 : 0;
}
public static synchronized boolean devEnv() {
return devEnv;
return devEnv == 1;
}
public static synchronized boolean client() {
return client == 1;
}
}
@@ -48,6 +48,8 @@ public class RFBLoadingPlugin implements RfbPlugin {
exc.invoke(loader, "com.falsepattern.lib.internal.core.LowLevelCallMultiplexer");
} catch (Exception ignored) {}
PreShare.initDevState(((URLClassLoader)loader).findResource("net/minecraft/world/World.class") != null);
PreShare.initClientState(((URLClassLoader)loader).findResource("net/minecraft/client/Minecraft.class") != null ||
((URLClassLoader)loader).findResource("bao.class") != null);
LetsEncryptHelper.replaceSSLContext();
LowLevelCallMultiplexer.rfbDetected();
DependencyLoaderImpl.executeDependencyLoading();