From a13706f240e58f4719bacfb9b3364ad1f5530cae Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Thu, 18 Jan 2024 19:45:56 +0500 Subject: [PATCH] fucking forge --- fabric/src/main/resources/fabric.mod.json | 2 +- .../ru/octol1ttle/knockdowns/forge/KnockdownsForge.java | 8 +++++--- forge/src/main/resources/META-INF/mods.toml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index b1f1a7c..5e30f2e 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -3,7 +3,7 @@ "id": "knockdowns", "version": "${version}", "name": "Knockdowns", - "description": "DNBO mechanic from Fortnite, ported to Minecraft", + "description": "DBNO mechanic from Fortnite, ported to Minecraft", "authors": [ "Octol1ttle" ], diff --git a/forge/src/main/java/ru/octol1ttle/knockdowns/forge/KnockdownsForge.java b/forge/src/main/java/ru/octol1ttle/knockdowns/forge/KnockdownsForge.java index dd706c0..83a53a8 100644 --- a/forge/src/main/java/ru/octol1ttle/knockdowns/forge/KnockdownsForge.java +++ b/forge/src/main/java/ru/octol1ttle/knockdowns/forge/KnockdownsForge.java @@ -1,7 +1,7 @@ package ru.octol1ttle.knockdowns.forge; import dev.architectury.platform.forge.EventBuses; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @@ -13,11 +13,13 @@ import ru.octol1ttle.knockdowns.common.KnockdownsCommon; public class KnockdownsForge { public KnockdownsForge() { // Submit our event bus to let architectury register our content on the right time - EventBuses.registerModEventBus(KnockdownsCommon.MOD_ID, FMLJavaModLoadingContext.get().getModEventBus()); + IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); + EventBuses.registerModEventBus(KnockdownsCommon.MOD_ID, modEventBus); + modEventBus.addListener(this::onInitializeClient); + KnockdownsCommon.init(); } - @SubscribeEvent public void onInitializeClient(FMLClientSetupEvent event) { KnockdownsClient.init(); } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 0a8e11a..9e1ece6 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ version = "${version}" displayName = "Knockdowns" authors = "Octol1ttle" description = ''' -DNBO mechanic from Fortnite, ported to Minecraft +DBNO mechanic from Fortnite, ported to Minecraft ''' #logoFile = ""