Remove ModCore

That was never actually finished and we do not need to keep it around anymore.
Whether we add its successor once that is ready for production use remains to be
seen.
This commit is contained in:
Jonas Herzig
2021-07-24 19:15:08 +02:00
parent 5bede327f3
commit e9bf75b4d6
3 changed files with 0 additions and 561 deletions

View File

@@ -1,14 +1,8 @@
//#if FABRIC>=1
package com.replaymod.core;
import com.replaymod.extras.modcore.ModCoreInstaller;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import org.spongepowered.asm.mixin.Mixins;
import java.io.File;
import java.util.Optional;
// We need to wait for MM to call us, otherwise we might initialize our mixins before it calls optifabric which would
// result in OF classes not existing while our mixins get resolved.
public class ReplayModMMLauncher implements Runnable {
@@ -32,43 +26,6 @@ public class ReplayModMMLauncher implements Runnable {
Mixins.addConfiguration("mixins.render.blend.replaymod.json");
Mixins.addConfiguration("mixins.render.replaymod.json");
Mixins.addConfiguration("mixins.replay.replaymod.json");
try {
initModCore();
} catch (Throwable t) {
System.err.println("ReplayMod caught error during ModCore init:");
t.printStackTrace();
}
}
// Forge equivalent is in ReplayModTweaker
private void initModCore() {
if (System.getProperty("REPLAYMOD_SKIP_MODCORE", "false").equalsIgnoreCase("true")) {
System.out.println("ReplayMod not initializing ModCore because REPLAYMOD_SKIP_MODCORE is true.");
return;
}
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
System.out.println("ReplayMod not initializing ModCore because we're in a development environment.");
return;
}
File gameDir = FabricLoader.getInstance().getGameDirectory();
Optional<ModContainer> minecraft = FabricLoader.getInstance().getModContainer("minecraft");
if (!minecraft.isPresent()) {
System.err.println("ReplayMod could not determine Minecraft version, skipping ModCore.");
return;
}
String mcVer = minecraft.get().getMetadata().getVersion().getFriendlyString();
int result = ModCoreInstaller.initialize(gameDir, mcVer + "_fabric");
if (result != -2) { // Don't even bother logging the result if there's no ModCore for this version.
System.out.println("ReplayMod ModCore init result: " + result);
}
if (ModCoreInstaller.isErrored()) {
System.err.println(ModCoreInstaller.getError());
}
}
}
//#endif