Files
FalsePatternLib/src/main/java/com/falsepattern/lib/internal/asm/RFBLoadingPlugin.java
T

55 lines
2.5 KiB
Java
Raw Normal View History

/*
2024-04-17 17:23:43 +02:00
* This file is part of FalsePatternLib.
*
2025-05-24 19:29:12 +02:00
* Copyright (C) 2022-2025 FalsePattern
* All Rights Reserved
*
2024-04-17 17:23:43 +02:00
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
2024-04-17 17:23:43 +02:00
* FalsePatternLib is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
2025-05-24 19:29:12 +02:00
* the Free Software Foundation, only version 3 of the License.
*
2024-04-17 17:23:43 +02:00
* FalsePatternLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
2024-04-17 17:23:43 +02:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
2024-04-17 17:23:43 +02:00
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.lib.internal.asm;
import com.falsepattern.lib.internal.core.LowLevelCallMultiplexer;
import com.falsepattern.lib.internal.impl.dependencies.DependencyLoaderImpl;
import com.falsepattern.lib.internal.impl.dependencies.LetsEncryptHelper;
2025-08-01 00:07:07 +02:00
import com.gtnewhorizons.retrofuturabootstrap.RfbApiImpl;
import com.gtnewhorizons.retrofuturabootstrap.api.RfbPlugin;
2025-08-01 00:07:07 +02:00
import lombok.val;
import java.net.URLClassLoader;
public class RFBLoadingPlugin implements RfbPlugin {
static {
2025-08-01 00:07:07 +02:00
val loader = RfbApiImpl.INSTANCE.launchClassLoader();
try {
val exc = loader.getClass()
.getDeclaredMethod("addClassLoaderExclusion", String.class);
exc.invoke(loader, "com.falsepattern.lib.dependencies.");
exc.invoke(loader, "com.falsepattern.lib.internal.impl.dependencies.");
exc.invoke(loader, "com.falsepattern.lib.internal.Internet");
exc.invoke(loader, "com.falsepattern.lib.internal.Share");
exc.invoke(loader, "com.falsepattern.lib.internal.asm.PreShare");
exc.invoke(loader, "com.falsepattern.lib.internal.FPLog");
exc.invoke(loader, "com.falsepattern.lib.internal.Tags");
exc.invoke(loader, "com.falsepattern.lib.internal.config.EarlyConfig");
exc.invoke(loader, "com.falsepattern.lib.internal.core.LowLevelCallMultiplexer");
} catch (Exception ignored) {}
PreShare.initDevState(((URLClassLoader)loader).findResource("net/minecraft/world/World.class") != null);
LetsEncryptHelper.replaceSSLContext();
LowLevelCallMultiplexer.rfbDetected();
2025-08-01 00:07:07 +02:00
DependencyLoaderImpl.executeDependencyLoading();
}
}