1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include "Block.h"
- class GrassBlockType;
- class GrassBlock : public Block
- {
- public:
- GrassBlock(int typeId,
- const ItemType* zTool,
- Framework::Vec3<int> pos);
- virtual bool onTick(
- TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- virtual void onDestroy() override;
- friend GrassBlockType;
- };
- class GrassBlockType : public BlockType
- {
- private:
- int itemType;
- bool transparent;
- bool passable;
- float hardness;
- const ItemType* zTool;
- float speedModifier;
- bool interactable;
- 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:
- GrassBlockType(int typeId,
- int itemTypeId,
- ModelInfo model,
- const char* name);
- };
|