MineColonies

MineColonies

53M Downloads

[EXT] Create a Registry for Buildings.

marchermans opened this issue ยท 3 comments

commented

Current situation:
A building is registered using addMapping as a static part of the AbstractBuilding Class. This fairly inflexible and a weird place to execute this kind of code.

Desired solution:

  • Create a IForgeRegistry which currently holds the data that is stored in the maps of AbstractBuilding class.
  • Initialize it in a Class created by Issue: #610.
commented

Do note that Forge registries are primarily intended to be used for IDs which need to be (a) assigned automatically as integer<->name mappings, and (b) synchronized between the server and client. For instance, Minecraft tile entities do not use the Forge registry system, as they're synchronized by their names. You might want to consider writing a simpler registry of your own if you don't need both - it is generally a better idea.

commented

I am not sure what currently is needed yet. As for syncing.... It is a nice feature to have.... As well as a fully tested system. No need to invent the wheel twice so to speak. Especially with me not knowing what we might need in the future.

commented

@OrionDevelopment Still needed?
I'll close and you can re-open with comments if still needed.