123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #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;
- virtual Framework::Text getTargetUIML();
- 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,
- const char* name);
- TreeSeblingBlockType* setHardness(float hardness);
- };
|