Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Property class - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setArrayEntryClass(java.lang.Class)
- ~ used to set the IArrayEntry class that will be used for an array property's array editing screen
- ~ could be useful for stuff like an array of strings that represent itemstacks, and so could have separate text fields for each portion of the itemstack
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setConfigEntryClass(java.lang.Class)
- ~ used to set the IConfigEntry class that will be used for this property's slot on the config GUI
- ~ this is useful if the modder wants to extend functionality of a provided entry class or implement a completely new entry class
- ~ could be used to do things like replace the default numeric controls with the non-default slider control https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/cpw/mods/fml/client/config/GuiConfigEntries.NumberSliderEntry.html
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setIsListLengthFixed(boolean)
- ~ only relevant to array properties
- ~ sets whether the array length is fixed or not (the fixed length is determined by the length of the default or read array, or by the setMaxListLength method if used)
- ~ when this method is called with a value of true the array editing gui will not show the buttons that allow adding new entry rows
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setMaxListLength(int)
- ~ only relevant to array properties
- ~ sets the max length of this array property (by default arrays do not have a max length)
- ~ when this method is called the stored array will be resized if it is larger than the max value, or if getIsFixedLength() == true and the list size differs from the max size defined
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setLanguageKey(java.lang.String)
- ~ everyone should use this so that their GUIs can be localized by users if desired and the GUIs have nice pretty names
- ~ the key defined here is used for both the property display name and the text of the property tooltip
- ~ if the key given is "mymod.config.myprop" the tooltip key expected is "mymod.config.myprop.tooltip"
- ~ the language translation methods use the vanilla .lang files
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setRequiresMcRestart(boolean)
- ~ sets the flag indicating that changing this property requires MC to be restarted to take effect
- ~ when users modify the value of a property that has this flag set a message will be shown upon saving (when the Done button is pressed on the top-level config GUI)
- ~ this flag also prevents a property from being edited while a world is currently running
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setRequiresWorldRestart(boolean)
- ~ sets the flag indicating that this property should not be changed while a world is currently running
- ~ when a world is running properties with this flag set will be disabled
- ~ if setRequiresMcRestart(boolean) is used it is not necessary to separately call this method
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setShowInGui(boolean)
- ~ sets the flag for whether or not to show this property on a config GUI (default is true)
- ~ Lex asked me to add this, and it is used for one or two settings in the Forge config, but most people will probably not need to use this
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setValidationPattern(java.util.regex.Pattern)
- ~ sets a Regex validation pattern object that will be used for String properties that allow keyboard input
- ~ useful for String properties that require input in a certain format in order to be parsed correctly
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Property.html#setValidValues(java.lang.String[])
- ~ when set for a String property the control will be a value cycling button rather than a text box
- ~ useful for properties that have a limited number of strings that are valid (such as choosing a display orientation or a world type)
- ConfigCategory class - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setConfigEntryClass(java.lang.Class)
- ~ used to set the IConfigEntry class that will be used for this category's slot on the config GUI
- ~ this is useful if the modder wants to extend functionality of a provided entry class or implement a completely new entry class
- ~ could be used to extend the CategoryEntryClass so that the list of child screen entries can be altered (such as adding custom controls)
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setLanguageKey(java.lang.String)
- ~ everyone should use this so that their GUIs can be localized by users if desired and the GUIs have nice pretty names
- ~ the key defined here is used for both the category display name and the text of the category tooltip
- ~ if the key given is "mymod.config.myctgy" the tooltip key expected is "mymod.config.myctgy.tooltip"
- ~ the language translation methods use the vanilla .lang files
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setPropertyOrder(java.util.List)
- ~ used to define the order that child properties will be displayed on GUIs and written to the .cfg file
- ~ provides an easy way to group together properties that make sense to be near each other if sub-categories would be overkill
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setRequiresMcRestart(boolean)
- ~ basically is a faster way to flag all child properties as requiring an MC restart to take effect
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setRequiresWorldRestart(boolean)
- ~ basically is a faster way to flag all child properties as unable to be edited while a world is running
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigCategory.html#setShowInGui(boolean)
- ~ defaults to true
- ~ gives a way to hide categories that are provided as a template for users to copy and modify when using the file config
- Configuration class - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#Configuration(java.io.File,%20java.lang.String)
- ~ Configuration objects are now able to be versioned!
- ~ this gives modders a way to check the version of a config file and either completely replace it or update it as needed via https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#getLoadedConfigVersion()
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#setCategoryConfigEntryClass(java.lang.String,%20java.lang.Class)
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#setCategoryLanguageKey(java.lang.String,%20java.lang.String)
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#setCategoryRequiresMcRestart(java.lang.String,%20boolean)
- - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#setCategoryRequiresWorldRestart(java.lang.String,%20boolean)
- ~ convenience methods for setting GUI-related fields on a category similar to https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/Configuration.html#addCustomCategoryComment(java.lang.String,%20java.lang.String)
- ConfigElement class - https://dl.dropboxusercontent.com/u/20748481/Minecraft/ForgeJD/net/minecraftforge/common/config/ConfigElement.html
- - this is a completely new class that implements IConfigElement, the interface that allows the config GUI screens to read from config objects and save back to them
- - might be useful to just highlight it as the bridge between Forge config classes and the FML GUI stuff
Advertisement
Add Comment
Please, Sign In to add comment