12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #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,
- int dimensionId,
- 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, int dimensionId) const override;
- public:
- TreeSeblingBlockType(int typeId,
- int itemTypeId,
- ModelInfo model,
- int woodType,
- int leavesType,
- const char* name, int mapColor);
- TreeSeblingBlockType* setHardness(float hardness);
- };
|