forgeEventBus -> gameEventBus

This commit is contained in:
IThundxr 2024-10-12 15:57:05 -04:00
parent f6ca19cee0
commit 68e545bddb
Failed to generate hash of commit

View file

@ -53,21 +53,21 @@ public final class FlywheelNeoForge {
FlwImpl.init(); FlwImpl.init();
} }
private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBus modEventBus) { private static void registerImplEventListeners(IEventBus gameEventBus, IEventBus modEventBus) {
forgeEventBus.addListener((ReloadLevelRendererEvent e) -> BackendManagerImpl.onReloadLevelRenderer(e.level())); gameEventBus.addListener((ReloadLevelRendererEvent e) -> BackendManagerImpl.onReloadLevelRenderer(e.level()));
forgeEventBus.addListener((LevelTickEvent.Post e) -> { gameEventBus.addListener((LevelTickEvent.Post e) -> {
// Make sure we don't tick on the server somehow. // Make sure we don't tick on the server somehow.
if (e.getLevel().isClientSide()) { if (e.getLevel().isClientSide()) {
VisualizationEventHandler.onClientTick(Minecraft.getInstance(), e.getLevel()); VisualizationEventHandler.onClientTick(Minecraft.getInstance(), e.getLevel());
} }
}); });
forgeEventBus.addListener((EntityJoinLevelEvent e) -> VisualizationEventHandler.onEntityJoinLevel(e.getLevel(), e.getEntity())); gameEventBus.addListener((EntityJoinLevelEvent e) -> VisualizationEventHandler.onEntityJoinLevel(e.getLevel(), e.getEntity()));
forgeEventBus.addListener((EntityLeaveLevelEvent e) -> VisualizationEventHandler.onEntityLeaveLevel(e.getLevel(), e.getEntity())); gameEventBus.addListener((EntityLeaveLevelEvent e) -> VisualizationEventHandler.onEntityLeaveLevel(e.getLevel(), e.getEntity()));
forgeEventBus.addListener(FlwCommands::registerClientCommands); gameEventBus.addListener(FlwCommands::registerClientCommands);
forgeEventBus.addListener((CustomizeGuiOverlayEvent.DebugText e) -> { gameEventBus.addListener((CustomizeGuiOverlayEvent.DebugText e) -> {
Minecraft minecraft = Minecraft.getInstance(); Minecraft minecraft = Minecraft.getInstance();
if (!minecraft.getDebugOverlay().showDebugScreen()) { if (!minecraft.getDebugOverlay().showDebugScreen()) {
@ -93,8 +93,8 @@ public final class FlywheelNeoForge {
}); });
} }
private static void registerLibEventListeners(IEventBus forgeEventBus, IEventBus modEventBus) { private static void registerLibEventListeners(IEventBus gameEventBus, IEventBus modEventBus) {
forgeEventBus.addListener((LevelEvent.Unload e) -> LevelAttached.invalidateLevel(e.getLevel())); gameEventBus.addListener((LevelEvent.Unload e) -> LevelAttached.invalidateLevel(e.getLevel()));
modEventBus.addListener((EndClientResourceReloadEvent e) -> ResourceReloadCache.onEndClientResourceReload()); modEventBus.addListener((EndClientResourceReloadEvent e) -> ResourceReloadCache.onEndClientResourceReload());
modEventBus.addListener((EndClientResourceReloadEvent e) -> ResourceReloadHolder.onEndClientResourceReload()); modEventBus.addListener((EndClientResourceReloadEvent e) -> ResourceReloadHolder.onEndClientResourceReload());
@ -103,8 +103,8 @@ public final class FlywheelNeoForge {
modEventBus.addListener(PartialModelEventHandler::onBakingCompleted); modEventBus.addListener(PartialModelEventHandler::onBakingCompleted);
} }
private static void registerBackendEventListeners(IEventBus forgeEventBus, IEventBus modEventBus) { private static void registerBackendEventListeners(IEventBus gameEventBus, IEventBus modEventBus) {
forgeEventBus.addListener((ReloadLevelRendererEvent e) -> Uniforms.onReloadLevelRenderer()); gameEventBus.addListener((ReloadLevelRendererEvent e) -> Uniforms.onReloadLevelRenderer());
modEventBus.addListener((RegisterClientReloadListenersEvent e) -> { modEventBus.addListener((RegisterClientReloadListenersEvent e) -> {
e.registerReloadListener(FlwProgramsReloader.INSTANCE); e.registerReloadListener(FlwProgramsReloader.INSTANCE);