Merge 1.18 into 1.19.2
This commit is contained in:
commit
bd3a9eb345
|
|
@ -76,10 +76,6 @@ public class ModernFix {
|
|||
ClassInfoManager.clear();
|
||||
}
|
||||
|
||||
public void onLoadComplete() {
|
||||
ClassInfoManager.clear();
|
||||
}
|
||||
|
||||
public void onServerDead(MinecraftServer server) {
|
||||
/* Clear as much data from the integrated server as possible, in case a mod holds on to it */
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import org.embeddedt.modernfix.platform.ModernFixPlatformHooks;
|
|||
import org.embeddedt.modernfix.searchtree.JEIBackedSearchTree;
|
||||
import org.embeddedt.modernfix.searchtree.REIBackedSearchTree;
|
||||
import org.embeddedt.modernfix.searchtree.SearchTreeProviderRegistry;
|
||||
import org.embeddedt.modernfix.util.ClassInfoManager;
|
||||
import org.embeddedt.modernfix.world.IntegratedWatchdog;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
|
|
@ -72,6 +73,7 @@ public class ModernFixClient {
|
|||
gameStartTimeSeconds = ManagementFactory.getRuntimeMXBean().getUptime() / 1000f;
|
||||
ModernFix.LOGGER.warn("Game took " + gameStartTimeSeconds + " seconds to start");
|
||||
ModernFixPlatformHooks.onLaunchComplete();
|
||||
ClassInfoManager.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import net.minecraft.server.MinecraftServer;
|
|||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class ModernFixFabric implements ModInitializer {
|
||||
private ModernFix commonMod;
|
||||
public static ModernFix commonMod;
|
||||
public static WeakReference<MinecraftServer> theServer = new WeakReference<>(null);
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import net.minecraftforge.fml.*;
|
|||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.fml.loading.FMLConfig;
|
||||
import net.minecraftforge.fml.loading.FMLLoader;
|
||||
|
|
@ -39,7 +38,6 @@ public class ModernFixForge {
|
|||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::commonSetup);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onLoadComplete);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::registerItems);
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> MinecraftForge.EVENT_BUS.register(new ModernFixClientForge()));
|
||||
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true));
|
||||
|
|
@ -94,10 +92,6 @@ public class ModernFixForge {
|
|||
commonMod.onServerDead(event.getServer());
|
||||
}
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onLoadComplete(FMLLoadCompleteEvent event) {
|
||||
commonMod.onLoadComplete();
|
||||
}
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onServerStarted(ServerStartedEvent event) {
|
||||
commonMod.onServerStarted();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user