wildcardgamez / Buddycards-Core

Other
6 stars 10 forks source link

Better support for expansions #3

Closed LLytho closed 2 years ago

LLytho commented 2 years ago

Hey,

the PR contains multiple things to help making expansions.

  1. Custom CardDisplays. CardDisplayBlockEntity now uses BuddycardsBlocks::DISPLAY_BLOCKS to get the needed blocks. So expansions can use BuddycardsBlocks::registerDisplay to register their displays.
  2. Change a lot of private field to protected for inheritance
  3. MedalRenderer uses now a ResourceLocation for mod based resource paths
  4. Random -> Rarity weights. Helps to create sets where some rarities does not exist without implementing some custom behavior. Pack creation fails if no weights set. Also crashes if weights contains a rarity which does not exist in the card set.
  5. Replace String set with BuddycardSet set. Every set now knows his medal and the cards and also provides the descriptions id for translation.