#pragma once #include "Block.h" class TreeSeblingBlockType; class TreeSeblingBlock : public Block { private: float seblingTicks; int seblingTicksMax; const BlockType* wood; const BlockType* leaves; public: TreeSeblingBlock(const BlockType* zType, const ItemType* zTool, Framework::Vec3 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; protected: bool transparent; bool passable; float hardness; const ItemType* zTool; float speedModifier; bool interactable; TreeSeblingBlockType(int typeId, int itemTypeId, ModelInfo model); 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; }; class OakSeblingBlockType : public TreeSeblingBlockType { REGISTRABLE(OakSeblingBlockType) protected: OakSeblingBlockType(); public: virtual Block* createBlock(Framework::Vec3 position) const override; }; REGISTER(OakSeblingBlockType, BlockType) class BirchSeblingBlockType : public TreeSeblingBlockType { REGISTRABLE(BirchSeblingBlockType) protected: BirchSeblingBlockType(); public: virtual Block* createBlock(Framework::Vec3 position) const override; }; REGISTER(BirchSeblingBlockType, BlockType) class BeechSeblingBlockType : public TreeSeblingBlockType { REGISTRABLE(BeechSeblingBlockType) protected: BeechSeblingBlockType(); public: virtual Block* createBlock(Framework::Vec3 position) const override; }; REGISTER(BeechSeblingBlockType, BlockType) class PineSeblingBlockType : public TreeSeblingBlockType { REGISTRABLE(PineSeblingBlockType) protected: PineSeblingBlockType(); public: virtual Block* createBlock(Framework::Vec3 position) const override; }; REGISTER(PineSeblingBlockType, BlockType)