123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #pragma once
- #include "Block.h"
- class GrassBlockType;
- class GrassBlock : public Block
- {
- public:
- GrassBlock(int typeId,
- const ItemType* zTool,
- Framework::Vec3<int> pos,
- int dimensionId);
- virtual bool onTick(
- TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- virtual void onDestroy() override;
- void filterPassingLight(unsigned char rgb[3]) const 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, int dimensionId) const override;
- public:
- GrassBlockType(int typeId,
- int itemTypeId,
- ModelInfo model,
- const char* name,
- int mapColor);
- };
|