Upload magma

This commit is contained in:
Diamond Creeper 2024-03-04 21:16:02 +13:00
commit dfa9ee0b24
5008 changed files with 653442 additions and 0 deletions

8
fmlonly/index.html Normal file
View file

@ -0,0 +1,8 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/</h1><hr><pre><a href="../">../</a>
<a href="src/">src/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="5000c9d7e8b97b9dbcc1d8c54d199efa" data-cf-beacon='{"rayId":"85f014e3b84b50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

1
fmlonly/src/fmlcommon Normal file
View file

@ -0,0 +1 @@
../../src/fmlcommon/

9
fmlonly/src/index.html Normal file
View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/</h1><hr><pre><a href="../">../</a>
<a href="main/">main/</a> 07-Oct-2023 14:12 -
<a href="fmlcommon">fmlcommon</a> 07-Oct-2023 14:12 20
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="d553314274274933c1e3c4f0bd57f35c" data-cf-beacon='{"rayId":"85f0152fbf8b50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/</h1><hr><pre><a href="../">../</a>
<a href="java/">java/</a> 07-Oct-2023 14:12 -
<a href="resources/">resources/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="c79a145ac7ddfd27ede53a1125032523" data-cf-beacon='{"rayId":"85f015695c5750c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/</h1><hr><pre><a href="../">../</a>
<a href="net/">net/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="2cc6a8b436c3a7f55c837f6f92fb9d7a" data-cf-beacon='{"rayId":"85f015a43b8a50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/</h1><hr><pre><a href="../">../</a>
<a href="minecraftforge/">minecraftforge/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="92a669f1dcfb92b8e2c345ab5cf406fa" data-cf-beacon='{"rayId":"85f0161dbcd750c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,47 @@
/*
* Minecraft Forge - Forge Development LLC
* SPDX-License-Identifier: LGPL-2.1-only
*/
package net.minecraftforge.fmlonly;
import net.minecraftforge.eventbus.api.BusBuilder;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.I18NParser;
import net.minecraftforge.fml.IBindingsProvider;
import net.minecraftforge.fml.config.IConfigEvent;
import net.minecraftforge.fml.event.config.ModConfigEvent;
import java.util.Arrays;
import java.util.Objects;
import java.util.function.Supplier;
import java.util.stream.Collectors;
public class FMLOnlyBindings implements IBindingsProvider {
private static final IEventBus DUMMYFORGEBUS = BusBuilder.builder().build();
@Override
public Supplier<IEventBus> getForgeBusSupplier() {
return ()->DUMMYFORGEBUS;
}
@Override
public Supplier<I18NParser> getMessageParser() {
return ()->new I18NParser() {
@Override
public String parseMessage(final String i18nMessage, final Object... args) {
return i18nMessage + Arrays.stream(args).map(Objects::toString).collect(Collectors.joining(",", "[", "]"));
}
@Override
public String stripControlCodes(final String toStrip) {
return toStrip;
}
};
}
@Override
public Supplier<IConfigEvent.ConfigConfig> getConfigConfiguration() {
return ()->new IConfigEvent.ConfigConfig(ModConfigEvent.Loading::new, ModConfigEvent.Reloading::new, ModConfigEvent.Unloading::new);
}
}

View file

@ -0,0 +1,11 @@
/*
* Minecraft Forge - Forge Development LLC
* SPDX-License-Identifier: LGPL-2.1-only
*/
package net.minecraftforge.fmlonly;
import net.minecraftforge.fml.common.Mod;
@Mod("fmlonly")
public class FMLOnlyMod {}

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonly/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonly/</h1><hr><pre><a href="../">../</a>
<a href="FMLOnlyBindings.java">FMLOnlyBindings.java</a> 07-Oct-2023 14:12 1555
<a href="FMLOnlyMod.java">FMLOnlyMod.java</a> 07-Oct-2023 14:12 216
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="7a086e2f916f9edf5d5a8ad6fc3ad637" data-cf-beacon='{"rayId":"85f019a2ac5550c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,81 @@
/*
* Minecraft Forge - Forge Development LLC
* SPDX-License-Identifier: LGPL-2.1-only
*/
package net.minecraftforge.fmlonlyclient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.ClientPackSource;
import net.minecraft.server.packs.repository.PackRepository;
import net.minecraft.server.packs.resources.PreparableReloadListener;
import net.minecraft.server.packs.resources.ReloadableResourceManager;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.LoadingFailedException;
import net.minecraftforge.fml.ModLoader;
import net.minecraftforge.fml.ModWorkManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
@OnlyIn(Dist.CLIENT)
public class ClientModLoader
{
private static boolean loading;
private static Minecraft mc;
private static boolean loadingComplete;
private static LoadingFailedException error;
public static void begin(final Minecraft minecraft, final PackRepository defaultResourcePacks, final ReloadableResourceManager mcResourceManager)
{
// force log4j to shutdown logging in a shutdown hook. This is because we disable default shutdown hook so the server properly logs it's shutdown
Runtime.getRuntime().addShutdownHook(new Thread(LogManager::shutdown));
loading = true;
ClientModLoader.mc = minecraft;
createRunnableWithCatch(()->ModLoader.get().gatherAndInitializeMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), ()->{})).run();
mcResourceManager.registerReloadListener(ClientModLoader::onResourceReload);
}
private static CompletableFuture<Void> onResourceReload(final PreparableReloadListener.PreparationBarrier stage, final ResourceManager resourceManager, final ProfilerFiller prepareProfiler, final ProfilerFiller executeProfiler, final Executor asyncExecutor, final Executor syncExecutor) {
return CompletableFuture.runAsync(createRunnableWithCatch(() -> startModLoading(ModWorkManager.wrappedExecutor(syncExecutor), asyncExecutor)), ModWorkManager.parallelExecutor())
.thenCompose(stage::wait)
.thenRunAsync(() -> finishModLoading(ModWorkManager.wrappedExecutor(syncExecutor), asyncExecutor), ModWorkManager.parallelExecutor());
}
private static Runnable createRunnableWithCatch(Runnable r) {
return ()-> {
if (loadingComplete) return;
try {
r.run();
} catch (LoadingFailedException e) {
if (error == null) error = e;
}
};
}
private static void startModLoading(ModWorkManager.DrivenExecutor syncExecutor, Executor parallelExecutor) {
if (error!=null) throw error;
createRunnableWithCatch(() -> ModLoader.get().loadMods(syncExecutor, parallelExecutor, ()->{})).run();
}
private static void finishModLoading(ModWorkManager.DrivenExecutor syncExecutor, Executor parallelExecutor)
{
if (error!=null) throw error;
createRunnableWithCatch(() -> ModLoader.get().finishMods(syncExecutor, parallelExecutor, ()->{})).run();
loading = false;
loadingComplete = true;
// reload game settings on main thread
syncExecutor.execute(()->mc.options.load());
}
public static boolean isLoading()
{
return loading;
}
}

View file

@ -0,0 +1,8 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonlyclient/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonlyclient/</h1><hr><pre><a href="../">../</a>
<a href="ClientModLoader.java">ClientModLoader.java</a> 07-Oct-2023 14:12 3667
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="d5c40fe12f448b1bd444c06434cc1a53" data-cf-beacon='{"rayId":"85f019a4e98a50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,56 @@
/*
* Minecraft Forge - Forge Development LLC
* SPDX-License-Identifier: LGPL-2.1-only
*/
package net.minecraftforge.fmlonlyserver;
import joptsimple.OptionParser;
import net.minecraftforge.fml.LoadingFailedException;
import net.minecraftforge.fml.ModLoader;
import net.minecraftforge.fml.ModLoadingWarning;
import net.minecraftforge.fml.ModWorkManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.File;
import java.util.List;
import static net.minecraftforge.fml.Logging.LOADING;
public class ServerModLoader
{
private static final Logger LOGGER = LogManager.getLogger();
private static boolean hasErrors = false;
public static void addOptions(OptionParser parser)
{
// We consume this argument as we use it in the launcher and the client side.
parser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File("."));
}
public static void load()
{
try
{
ModLoader.get().gatherAndInitializeMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
ModLoader.get().loadMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
ModLoader.get().finishMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), () -> {});
} catch (LoadingFailedException error)
{
ServerModLoader.hasErrors = true;
throw error;
}
List<ModLoadingWarning> warnings = ModLoader.get().getWarnings();
if (!warnings.isEmpty())
{
LOGGER.warn(LOADING, "Mods loaded with {} warnings", warnings.size());
warnings.forEach(warning -> LOGGER.warn(LOADING, warning.formatToString()));
}
}
public static boolean hasErrors()
{
return ServerModLoader.hasErrors;
}
}

View file

@ -0,0 +1,8 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonlyserver/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/fmlonlyserver/</h1><hr><pre><a href="../">../</a>
<a href="ServerModLoader.java">ServerModLoader.java</a> 07-Oct-2023 14:12 1893
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="6fdcb0f0ec5f8cfa24d6c80b1c2413cf" data-cf-beacon='{"rayId":"85f019a76e6550c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,10 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/java/net/minecraftforge/</h1><hr><pre><a href="../">../</a>
<a href="fmlonly/">fmlonly/</a> 07-Oct-2023 14:12 -
<a href="fmlonlyclient/">fmlonlyclient/</a> 07-Oct-2023 14:12 -
<a href="fmlonlyserver/">fmlonlyserver/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="9743e0475408e9bf45b8361d4ab90f81" data-cf-beacon='{"rayId":"85f016cb0d0150c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,4 @@
{
"load_fml_client": "coremods/load_fml_client.js",
"load_fml_server": "coremods/load_fml_server.js"
}

View file

@ -0,0 +1,10 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/META-INF/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/META-INF/</h1><hr><pre><a href="../">../</a>
<a href="services/">services/</a> 07-Oct-2023 14:12 -
<a href="coremods.json">coremods.json</a> 07-Oct-2023 14:12 106
<a href="mods.toml">mods.toml</a> 07-Oct-2023 14:12 481
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="3ada4a773b4ea7f290eda83957761094" data-cf-beacon='{"rayId":"85f0162019ec50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,16 @@
modLoader="javafml"
loaderVersion="[24,]"
issueTrackerURL="https://www.minecraftforge.net/"
license="LGPL v2.1"
[[mods]]
modId="fmlonly"
# We use the global forge version
version="${global.forgeVersion}"
updateJSONURL="https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json"
displayName="Forge"
credits="Anyone who has contributed on Github and supports our development"
authors="LexManos,cpw"
description='''
Forge, a broad compatibility API.
'''

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/META-INF/services/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/META-INF/services/</h1><hr><pre><a href="../">../</a>
<a href="net.minecraftforge.fml.IBindingsProvider">net.minecraftforge.fml.IBindingsProvider</a> 07-Oct-2023 14:12 42
<a href="net.minecraftforge.fml.IModStateProvider">net.minecraftforge.fml.IModStateProvider</a> 07-Oct-2023 14:12 44
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="c8cf31048ae46bcb5244522f53010b0c" data-cf-beacon='{"rayId":"85f016cd695f50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1 @@
net.minecraftforge.fmlonly.FMLOnlyBindings

View file

@ -0,0 +1 @@
net.minecraftforge.fml.core.ModStateProvider

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/coremods/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/coremods/</h1><hr><pre><a href="../">../</a>
<a href="load_fml_client.js">load_fml_client.js</a> 07-Oct-2023 14:12 1974
<a href="load_fml_server.js">load_fml_server.js</a> 07-Oct-2023 14:12 1883
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="6d3718eedda763bc9ed4eb073394e61e" data-cf-beacon='{"rayId":"85f016227e4350c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,36 @@
var ASMAPI = Java.type('net.minecraftforge.coremod.api.ASMAPI')
var Opcodes = Java.type('org.objectweb.asm.Opcodes')
function initializeCoreMod() {
return {
'minecraft': {
'target': {
'type': 'METHOD',
'class': 'net.minecraft.client.Minecraft',
'methodName': '<init>',
'methodDesc': '(Lnet/minecraft/client/main/GameConfig;)V'
},
'transformer': function(methodNode) {
//print(ASMAPI.methodNodeToString(methodNode))
var meth = ASMAPI.getMethodNode();
var resourcePackRepository = ASMAPI.mapField("f_91038_")
var resourceManager = ASMAPI.mapField("f_91036_")
meth.visitVarInsn(Opcodes.ALOAD, 0);
meth.visitVarInsn(Opcodes.ALOAD, 0);
meth.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/client/Minecraft", resourcePackRepository, "Lnet/minecraft/server/packs/repository/PackRepository;");
meth.visitVarInsn(Opcodes.ALOAD, 0);
meth.visitFieldInsn(Opcodes.GETFIELD, "net/minecraft/client/Minecraft", resourceManager, "Lnet/minecraft/server/packs/resources/ReloadableResourceManager;");
meth.visitMethodInsn(Opcodes.INVOKESTATIC, "net/minecraftforge/fmlonlyclient/ClientModLoader", "begin", "(Lnet/minecraft/client/Minecraft;Lnet/minecraft/server/packs/repository/PackRepository;Lnet/minecraft/server/packs/resources/ReloadableResourceManager;)V", false)
for (var i=0; i<methodNode.instructions.size(); i++) {
var ain = methodNode.instructions.get(i);
if (ain.getOpcode() == Opcodes.PUTFIELD && ain.name.equals(resourceManager)) {
methodNode.instructions.insert(ain, meth.instructions);
break;
}
}
return methodNode;
}
},
}
}

View file

@ -0,0 +1,35 @@
var ASMAPI = Java.type('net.minecraftforge.coremod.api.ASMAPI')
var Opcodes = Java.type('org.objectweb.asm.Opcodes')
function initializeCoreMod() {
return {
'minecraft': {
'target': {
'type': 'METHOD',
'class': 'net.minecraft.server.Main',
'methodName': 'main',
'methodDesc': '([Ljava/lang/String;)V'
},
'transformer': function(methodNode) {
var meth = ASMAPI.getMethodNode();
meth.visitMethodInsn(Opcodes.INVOKESTATIC, 'net/minecraftforge/fmlonlyserver/ServerModLoader', 'load', '()V', false)
var methOptions = ASMAPI.getMethodNode();
methOptions.visitIntInsn(Opcodes.ALOAD, 1);
methOptions.visitMethodInsn(Opcodes.INVOKESTATIC, 'net/minecraftforge/fmlonlyserver/ServerModLoader', 'addOptions', '(Ljoptsimple/OptionParser;)V', false)
for (var i=0; i<methodNode.instructions.size(); i++) {
var ain = methodNode.instructions.get(i);
if (ain.getOpcode() == Opcodes.INVOKESPECIAL && ain.owner == 'joptsimple/OptionParser' && ain.name == '<init>' && ain.desc == '()V') {
// Inject after the STORE
methodNode.instructions.insert(methodNode.instructions.get(i + 1), methOptions.instructions);
} else if (ain.getOpcode() == Opcodes.INVOKESTATIC && ain.owner == 'net/minecraft/Util' && ain.name == ASMAPI.mapMethod('m_137584_') /* startTimerHackThread */ && ain.desc == '()V') {
methodNode.instructions.insert(ain, meth.instructions);
break; // By this point we've already reached the first injection point so break
}
}
return methodNode;
}
},
}
}

View file

@ -0,0 +1,9 @@
<html>
<head><title>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/</title></head>
<body>
<h1>Index of /mirror/src/Magma-1-20-x/fmlonly/src/main/resources/</h1><hr><pre><a href="../">../</a>
<a href="META-INF/">META-INF/</a> 07-Oct-2023 14:12 -
<a href="coremods/">coremods/</a> 07-Oct-2023 14:12 -
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="1e527f682106ace641cf4b2059a1508d" data-cf-beacon='{"rayId":"85f015a6787350c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
</body>
</html>