12345678910111213141516171819202122232425262728293031323334 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Punkt.h>
- #include "Block.h"
- class MultiblockStructure : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::Array<Framework::Punkt> affectedChunks;
- Framework::Array<Framework::Vec3<int>> memberBlockPositions;
- Framework::Vec3<int> uniquePosition;
- int dimensionId;
- __int64 structureId;
- protected:
- Framework::RCArray<Block> loadedMembers;
- public:
- MultiblockStructure(int dimensionId, __int64 structureId, Framework::Vec3<int> uniquePosition);
- ~MultiblockStructure();
- void onBlockLoaded(Block* block);
- void onBlockUnloaded(Block* zBlock);
- void addMemberPosition(Framework::Vec3<int > blockPos);
- virtual void onBlockRemoved(Block* zBlock);
- bool isEmpty() const;
- bool isFullyLoaded() const;
- bool isFullyUnloaded() const;
- bool isBlockMember(Block* zBlock) const;
- __int64 getStructureId() const;
- Framework::Vec3<int> getUniquePosition() const;
- };
|