Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split ModManager into two Classes #150

Open
5 tasks
Flo56958 opened this issue Jun 16, 2020 · 0 comments
Open
5 tasks

Split ModManager into two Classes #150

Flo56958 opened this issue Jun 16, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Flo56958
Copy link
Owner

Flo56958 commented Jun 16, 2020

The ModManager Class is way too bloated. As the name suggests it should handle all Modifiers. But it handles almost everything related to Items. That should not be task of the ModManager

  • Split ModManager into ModManager and ItemManager
  • Move both classes into a "core"-package and the Modifier-Types into the parent package
  • Add RewriteLore Event (or Observer on Lore change) to easily know when to rewrite the Lore
  • Add MineTinkerReloadEvent #149: Add Reload-Listener to reload on Event
  • Make the Pattern Matcher its own Class and add tests to test it

Tasks of the ModManager:

  • Register and unregister Modifiers
  • Manage enabled and disabled Modifiers
  • Apply Modifiers to Tools and Armor
  • Manage Modifiers on Items (Levels, Application, Removal)
  • Settings are in Modifiers.yml

Tasks of the ItemManager:

  • Convert ItemStacks
  • Manage ItemStacks (Exp, Level, Identifier, Core-Tags, Rewrite Lore)
  • Manage Lore (layout.yml)
  • Manage Item-Upgrades (the three methods)

ItemManager and ModManager should work hand in hand like two modules but separated enough that they are two separate classes that do not overlap in function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant