2024-04-17 17:17:44 +02:00
|
|
|
/*
|
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
|
2024-04-17 17:17:44 +02:00
|
|
|
* 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:17:44 +02:00
|
|
|
*
|
2024-04-17 17:23:43 +02:00
|
|
|
* FalsePatternLib is free software: you can redistribute it and/or modify
|
2024-04-17 17:17:44 +02:00
|
|
|
* 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:17:44 +02:00
|
|
|
*
|
2024-04-17 17:23:43 +02:00
|
|
|
* FalsePatternLib is distributed in the hope that it will be useful,
|
2024-04-17 17:17:44 +02:00
|
|
|
* 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.
|
2024-04-17 17:17:44 +02:00
|
|
|
*
|
|
|
|
|
* 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/>.
|
2024-04-17 17:17:44 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.falsepattern.lib.internal.asm;
|
|
|
|
|
|
|
|
|
|
import com.falsepattern.lib.internal.core.LowLevelCallMultiplexer;
|
|
|
|
|
import com.falsepattern.lib.internal.impl.dependencies.DependencyLoaderImpl;
|
2025-04-15 18:36:18 +02:00
|
|
|
import com.falsepattern.lib.internal.impl.dependencies.LetsEncryptHelper;
|
2025-08-01 00:07:07 +02:00
|
|
|
import com.gtnewhorizons.retrofuturabootstrap.RfbApiImpl;
|
2024-04-17 17:17:44 +02:00
|
|
|
import com.gtnewhorizons.retrofuturabootstrap.api.RfbPlugin;
|
2025-08-01 00:07:07 +02:00
|
|
|
import lombok.val;
|
|
|
|
|
|
|
|
|
|
import java.net.URLClassLoader;
|
2024-04-17 17:17:44 +02:00
|
|
|
|
|
|
|
|
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);
|
2025-04-15 18:36:18 +02:00
|
|
|
LetsEncryptHelper.replaceSSLContext();
|
2024-04-17 17:17:44 +02:00
|
|
|
LowLevelCallMultiplexer.rfbDetected();
|
2025-08-01 00:07:07 +02:00
|
|
|
DependencyLoaderImpl.executeDependencyLoading();
|
2024-04-17 17:17:44 +02:00
|
|
|
}
|
|
|
|
|
}
|