Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.46 KB

README.md

File metadata and controls

33 lines (27 loc) · 1.46 KB

airbreathercore

Contains dependencies that all of my mods rely on heavily.

In particular, it's where I dump reusable, modular abstractions (and, occasionally, implementations) of the following, limiting consumers' exposure to APIs that may be unstable and violate several principles of OOP that I care about:

  1. Event subscription
  2. Item registration and retrieval
  3. Recipe registration
  4. Configuration of the above items
  5. Mod lifecycle management
  6. Concrete implementation takes a modular composition of the above pieces.
  7. Uses those pieces together to run a standard sequence of actions during the well-defined "pre-init", "init", and "post-init" phases.
  8. Consumers now only need to provide their own implementations of each abstraction that encapsulates their needs, and provide a skeleton @Mod class that consumes this concrete implementation.

That's not to say that I think that these abstractions and/or implementations are the best way to do OOP, or that I think my software is entirely better than the software produced by Mojang, the FML team, the Forge team, or any other group/individual who creates the software used by mods. I simply prefer working with loosely-coupled code where each necessary service is provided by a well-defined abstraction.

Things I'm not particularly proud of that are my fault:

  1. Handlers for new event types will require changes here.
  2. Registration for new kinds of recipes will require changes here.