public class DefaultGuiFactory extends java.lang.Object implements IModGuiFactory
IModGuiFactory.RuntimeOptionCategoryElement| Modifier and Type | Field and Description |
|---|---|
protected Minecraft |
minecraft |
protected java.lang.String |
modid |
protected java.lang.String |
title |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultGuiFactory(java.lang.String modid,
java.lang.String title) |
| Modifier and Type | Method and Description |
|---|---|
GuiScreen |
createConfigGui(GuiScreen parentScreen)
Return an initialized
GuiScreen. |
static IModGuiFactory |
forMod(ModContainer mod) |
boolean |
hasConfigGui()
If this method returns false, the config button in the mod list will be disabled
|
void |
initialize(Minecraft minecraftInstance)
Called when instantiated to initialize with the active minecraft instance.
|
java.util.Set<IModGuiFactory.RuntimeOptionCategoryElement> |
runtimeGuiCategories()
Return a list of the "runtime" categories this mod wishes to populate with
GUI elements.
|
protected java.lang.String modid
protected java.lang.String title
protected Minecraft minecraft
protected DefaultGuiFactory(java.lang.String modid,
java.lang.String title)
public boolean hasConfigGui()
IModGuiFactoryhasConfigGui in interface IModGuiFactorypublic void initialize(Minecraft minecraftInstance)
IModGuiFactoryinitialize in interface IModGuiFactoryminecraftInstance - the instancepublic GuiScreen createConfigGui(GuiScreen parentScreen)
IModGuiFactoryGuiScreen. This screen will be displayed
when the "config" button is pressed in the mod list. It will
have a single argument constructor - the "parent" screen, the same as all
Minecraft GUIs. The expected behaviour is that this screen will replace the
"mod list" screen completely, and will return to the mod list screen through
the parent link, once the appropriate action is taken from the config screen.
This config GUI is anticipated to provide configuration to the mod in a friendly
visual way. It should not be abused to set internals such as IDs (they're gonna
keep disappearing anyway), but rather, interesting behaviours. This config GUI
is never run when a server game is running, and should be used to configure
desired behaviours that affect server state. Costs, mod game modes, stuff like that
can be changed here.createConfigGui in interface IModGuiFactoryparentScreen - The screen to which must be returned when closing the
returned screen.public java.util.Set<IModGuiFactory.RuntimeOptionCategoryElement> runtimeGuiCategories()
IModGuiFactoryruntimeGuiCategories in interface IModGuiFactorypublic static IModGuiFactory forMod(ModContainer mod)