1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include <Reader.h>
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include "ModelInfo.h"
- #include "StaticRegistry.h"
- class Block;
- class BlockType : public virtual Framework::ReferenceCounter
- {
- private:
- const int id;
- bool needsInstance;
- int initialMaxHP;
- bool needModelSubscription;
- bool fluid;
- char maxFlowDistance;
- ModelInfo model;
- public:
- BlockType(int id,
- bool needsInstance,
- ModelInfo model,
- int initialMaxHP,
- bool needModelSubscription,
- bool fluid,
- char maxFlowDistance);
- ~BlockType();
- Block* createBlock(Framework::Vec3<int> position, bool passable, float speedModifier);
- bool doesNeedInstance() const;
- bool doesNeedModelSubscription() const;
- bool isFluid() const;
- char getMaxFlowDistance() const;
- const ModelInfo& getModelInfo() const;
- int getId() const;
- };
|