diff --git a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java index 38ac7e3017a..289cae492c3 100644 --- a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java +++ b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java @@ -1238,7 +1238,7 @@ public static void initClientHooks(Minecraft mc, ReloadableResourceManager resou initializedClientHooks = true; ForgeGameTestHooks.registerGametests(); - MinecraftForge.EVENT_BUS.post(new RegisterSpriteSourceTypesEvent(SPRITE_SOURCE_TYPES_MAP)); + ModLoader.get().postEvent(new RegisterSpriteSourceTypesEvent(SPRITE_SOURCE_TYPES_MAP)); ModLoader.get().postEvent(new RegisterClientReloadListenersEvent(resourceManager)); ModLoader.get().postEvent(new EntityRenderersEvent.RegisterLayerDefinitions()); ModLoader.get().postEvent(new EntityRenderersEvent.RegisterRenderers()); diff --git a/src/main/java/net/minecraftforge/client/event/RegisterSpriteSourceTypesEvent.java b/src/main/java/net/minecraftforge/client/event/RegisterSpriteSourceTypesEvent.java index d88ec8d3168..331a31c184b 100644 --- a/src/main/java/net/minecraftforge/client/event/RegisterSpriteSourceTypesEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RegisterSpriteSourceTypesEvent.java @@ -11,10 +11,11 @@ import net.minecraft.client.renderer.texture.atlas.SpriteSource; import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Cancelable; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.fml.LogicalSide; +import net.minecraftforge.fml.event.IModBusEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; /** * Fired to allow mods to register their own SpriteSourceTypes. @@ -22,10 +23,10 @@ * *

This event is not {@linkplain Cancelable cancellable}, and does not {@linkplain HasResult have a result}.

* - *

This event is fired on the {@linkplain MinecraftForge#EVENT_BUS forge event bus}, + *

This event is fired on the {@linkplain FMLJavaModLoadingContext#getModEventBus() mod-specific event bus}, * only on the {@linkplain LogicalSide#CLIENT logical client}.

*/ -public class RegisterSpriteSourceTypesEvent extends Event +public class RegisterSpriteSourceTypesEvent extends Event implements IModBusEvent { private final BiMap types;