Package net.minecraftforge.common
Class MinecraftForge
java.lang.Object
net.minecraftforge.common.MinecraftForge
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.eventbus.api.IEventBusThe core Forge EventBusses, all events for Forge will be fired on these, you should use this to register all your listeners.private static final org.apache.logging.log4j.Marker(package private) static final ForgeInternalHandlerprivate static final org.apache.logging.log4j.Logger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidMethod invoked by FML before any other mods are loaded.static voidregisterConfigScreen(BiFunction<Minecraft, Screen, Screen> screenFunction) Register a config screen for the active mod container.static voidregisterConfigScreen(Function<Screen, Screen> screenFunction) Register a config screen for the active mod container.
- 
Field Details- 
EVENT_BUSpublic static final net.minecraftforge.eventbus.api.IEventBus EVENT_BUSThe core Forge EventBusses, all events for Forge will be fired on these, you should use this to register all your listeners. This replaces every register*Handler() function in the old version of Forge. TERRAIN_GEN_BUS for terrain gen events ORE_GEN_BUS for ore gen events EVENT_BUS for everything else
- 
INTERNAL_HANDLER
- 
LOGGERprivate static final org.apache.logging.log4j.Logger LOGGER
- 
FORGEprivate static final org.apache.logging.log4j.Marker FORGE
 
- 
- 
Constructor Details- 
MinecraftForgepublic MinecraftForge()
 
- 
- 
Method Details- 
initializepublic static void initialize()Method invoked by FML before any other mods are loaded.
- 
registerConfigScreenRegister a config screen for the active mod container.- Parameters:
- screenFunction- A function that takes the mods screen as an argument and returns your config screen to show when the player clicks the config button for your mod on the mods screen.- You should call - Minecraft.setScreen(Screen)with the provided mods screen for the action of your close button, using- Screen.minecraftto get the client instance.
- See Also:
 
- 
registerConfigScreenRegister a config screen for the active mod container.- Parameters:
- screenFunction- A function that takes the- Minecraftclient instance and the mods screen as arguments and returns your config screen to show when the player clicks the config button for your mod on the mods screen.- You should call - Minecraft.setScreen(Screen)with the provided client instance and mods screen for the action of your close button.
- See Also:
 
 
-