FANDOM


GregoryCommons is my dependency mod, used to centralized some Minecraft- and Forge-based functionality that I may use in multiple mods. An early state of the mod project is in my Github profile, in its own repository. My Github

One feature is a Java abstract public class ("IGregoryConfigMinecraft") which defines methods a configuration class would be using. I have noticed that a few mods like to create and handle configuration loading and storing from the mod's main class, even since ModLoader implementations; however, I think that is not optimal — I prefer to put configuration management settings into their own class. This class helps by defining the abstract methods that mod config classes will inherit and override.

Second, I have adapted some functional components used in Minecraft "GuiScreen" classes; primarily, I start with a button. It is a "toggle button" that stores the potential states, and current state, of a button which might have multiple states. This can be useful for more than just on-off states. The GuiScreen-extending class which may create a toggle button needs only a fraction of the lines of code to implement, and usually only just one or two for declaration: any time the button is clicked, a toggle method toggles to the next state.

Additional functionality that more than one of my mods may use, will be added as needed.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.