mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 11:27:54 +01:00
post to correct bus
This commit is contained in:
parent
6f946fcedc
commit
dc3e264869
2 changed files with 7 additions and 7 deletions
|
@ -41,13 +41,13 @@ public final class FlywheelNeoForge {
|
|||
.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();
|
||||
|
|
|
@ -15,7 +15,7 @@ import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent;
|
|||
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<Throwable> 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<Void> completablefuture, Optional<Throwable> 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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue