MineColonies

MineColonies

53M Downloads

[EXT] Detaching the creation of Buildings from the Colony and their Blocks

marchermans opened this issue · 1 comments

commented

In the current situation a new Building is constructed by calling its constructor:
Building(Colony c, BlockPos p);

It is currently being called from:

  • AbstractBuilding.createFromNBT(final Colony colony, @NotNull final NBTTagCompound compound)
  • Many of the Constructors use it as super(Colony c, BlockPos p). (This should stay)

Solution:

  • Create a singleton Factory class that holds IBuildingConstructors which create a new Building from the given colony and location.
  • Create a default construction class that wraps the current method of creating new instances.
commented

@OrionDevelopment Is this still something you are working on or no longer needed?
Since it's been a year already.
I'll close and you can reopen if needed with comments?