1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include "Block.h"
- class TreeSeblingBlockType;
- class TreeSeblingBlock : public Block
- {
- private:
- float seblingTicks;
- int seblingTicksMax;
- const BlockType* wood;
- const BlockType* leaves;
- public:
- TreeSeblingBlock(int typeId, const ItemType* zTool, Framework::Vec3<int> pos, const BlockType* wood, const BlockType* leaves);
- virtual bool onTick(TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- friend TreeSeblingBlockType;
- };
- class TreeSeblingBlockType : public BlockType
- {
- private:
- int itemType;
- bool transparent;
- bool passable;
- float hardness;
- const ItemType* zTool;
- float speedModifier;
- bool interactable;
- int woodType;
- int leavesType;
- protected:
- virtual void createSuperBlock(Block* zBlock, Item* zItem) const override;
- virtual void loadSuperBlock(Block* zBlock, Framework::StreamReader* zReader, int dimensionId) const override;
- virtual void saveSuperBlock(Block* zBlock, Framework::StreamWriter* zWriter) const override;
- virtual Item* createItem() const override;
- virtual Block* createBlock(Framework::Vec3<int> position) const override;
- public:
- TreeSeblingBlockType(int typeId, int itemTypeId, ModelInfo model, int woodType, int leavesType);
- TreeSeblingBlockType* setHardness(float hardness);
- };
|