diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelNeoForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelNeoForge.java index 162d528a0..4dd20b6fa 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelNeoForge.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelNeoForge.java @@ -41,13 +41,13 @@ public FlywheelNeoForge(IEventBus modEventBus, ModContainer modContainer) { .getModInfo() .getVersion(); - IEventBus forgeEventBus = NeoForge.EVENT_BUS; + IEventBus gameEventBus = NeoForge.EVENT_BUS; NeoForgeFlwConfig.INSTANCE.registerSpecs(modContainer); - registerImplEventListeners(forgeEventBus, modEventBus); - registerLibEventListeners(forgeEventBus, modEventBus); - registerBackendEventListeners(forgeEventBus, modEventBus); + registerImplEventListeners(gameEventBus, modEventBus); + registerLibEventListeners(gameEventBus, modEventBus); + registerBackendEventListeners(gameEventBus, modEventBus); CrashReportCallables.registerCrashCallable("Flywheel Backend", BackendManagerImpl::getBackendString); FlwImpl.init(); diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java index 4115da92d..50950fbab 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java @@ -15,7 +15,7 @@ import dev.engine_room.flywheel.impl.FlwImpl; import net.minecraft.client.Minecraft; import net.minecraft.server.packs.resources.ReloadableResourceManager; -import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.fml.ModLoader; @Mixin(Minecraft.class) abstract class MinecraftMixin { @@ -30,11 +30,11 @@ abstract class MinecraftMixin { @Inject(method = "lambda$new$8", at = @At("HEAD"), remap = false) private void flywheel$onEndInitialResourceReload(@Coerce Object gameLoadCookie, Optional error, CallbackInfo ci) { - NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error)); + ModLoader.postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, true, error)); } @Inject(method = "lambda$reloadResourcePacks$21", at = @At("HEAD"), remap = false) private void flywheel$onEndManualResourceReload(boolean recovery, @Coerce Object gameLoadCookie, CompletableFuture completablefuture, Optional error, CallbackInfo ci) { - NeoForge.EVENT_BUS.post(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error)); + ModLoader.postEvent(new EndClientResourceReloadEvent((Minecraft) (Object) this, resourceManager, false, error)); } }