Skip to content

Split ModManager into two Classes #150

Description

@Flo56958

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions