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 14175d6d45..33fa85bca9 100644 --- a/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java +++ b/src/main/java/net/neoforged/neoforge/common/NeoForgeMod.java @@ -424,7 +424,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(); @@ -438,7 +438,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); @@ -477,7 +476,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)));