Package net.minecraftforge.fml.common
Annotation Type Mod.EventBusSubscriber
-
@Retention(RUNTIME) @Target(TYPE) public static @interface Mod.EventBusSubscriber
Annotate a class which will be subscribed to an Event Bus at mod construction time. Defaults to subscribing the current modid to theMinecraftForge.EVENT_BUS
on both sides.- See Also:
Mod.EventBusSubscriber.Bus
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Mod.EventBusSubscriber.Bus
bus
Specify an alternative bus to listen tojava.lang.String
modid
Optional value, only necessary if this annotation is not on the same class that has a @Mod annotation.net.minecraftforge.api.distmarker.Dist[]
value
Specify targets to load this event subscriber on.
-
-
-
Element Detail
-
value
net.minecraftforge.api.distmarker.Dist[] value
Specify targets to load this event subscriber on. Can be used to avoid loading Client specific events on a dedicated server, for example.- Returns:
- an array of Dist to load this event subscriber on
- Default:
- {net.minecraftforge.api.distmarker.Dist.CLIENT, net.minecraftforge.api.distmarker.Dist.DEDICATED_SERVER}
-
-
-
bus
Mod.EventBusSubscriber.Bus bus
Specify an alternative bus to listen to- Returns:
- the bus you wish to listen to
- Default:
- net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.FORGE
-
-