From cc3e0cf2bd31d960371960f6fab7f8b789df6442 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:34:39 +0100 Subject: [PATCH] Update FML --- gradle.properties | 2 +- src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 244c897e8b..8edceecc5a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -31,7 +31,7 @@ jetbrains_annotations_version=24.0.1 slf4j_api_version=2.0.7 apache_maven_artifact_version=3.8.5 jarjar_version=0.4.0 -fancy_mod_loader_version=1.0.2 +fancy_mod_loader_version=1.0.9 mojang_logging_version=1.1.1 log4j_version=2.19.0 guava_version=31.1.2-jre diff --git a/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java b/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java index 059cee4adf..34a0809519 100644 --- a/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java +++ b/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java @@ -403,7 +403,7 @@ public static void enableMilkFluid() { enableMilkFluid = true; } - public NeoForgeMod() { + public NeoForgeMod(IEventBus modEventBus, Dist dist) { LOGGER.info(NEOFORGEMOD, "NeoForge mod loading, version {}, for MC {} with MCP {}", NeoForgeVersion.getVersion(), NeoFormVersion.getMCVersion(), NeoFormVersion.getMCPVersion()); ForgeSnapshotsMod.logStartupWarning(); @@ -417,7 +417,6 @@ public NeoForgeMod() { CrashReportCallables.registerCrashCallable("FML", NeoForgeVersion::getSpec); CrashReportCallables.registerCrashCallable("NeoForge", () -> NeoForgeVersion.getGroup() + ":" + NeoForgeVersion.getVersion()); - final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); // Forge-provided datapack registries modEventBus.addListener((DataPackRegistryEvent.NewRegistry event) -> { event.dataPackRegistry(ForgeRegistries.Keys.BIOME_MODIFIERS, BiomeModifier.DIRECT_CODEC); @@ -456,7 +455,7 @@ public NeoForgeMod() { UsernameCache.load(); TierSortingRegistry.init(); - if (FMLEnvironment.dist == Dist.CLIENT) ClientCommandHandler.init(); + if (dist == Dist.CLIENT) ClientCommandHandler.init(); DualStackUtils.initialise(); ForgeRegistries.ITEMS.tags().addOptionalTagDefaults(Tags.Items.ENCHANTING_FUELS, Set.of(ForgeRegistries.ITEMS.getDelegateOrThrow(Items.LAPIS_LAZULI)));