123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #pragma once
- #include "BlockType.h"
- #include "Block.h"
- class NoBlockBlockType;
- class NoBlock : public Block
- {
- public:
- static const NoBlock INSTANCE;
- protected:
- NoBlock();
- virtual bool onTick(TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- };
- class NoBlockBlockType : public BlockType
- {
- REGISTRABLE(NoBlockBlockType)
- protected:
- NoBlockBlockType();
- NoBlockBlockType(int id);
- virtual Block* createBlock(Framework::Vec3<int> position) const override;
- virtual Item* createItem() const override;
- virtual Block* loadBlock(Framework::Vec3<int> position, Framework::StreamReader* zReader) const override;
- virtual void saveBlock(Block* zBlock, Framework::StreamWriter* zWriter) const override;
- virtual Item* getItemFromBlock(Block* zBlock) const override;
- virtual Block* createBlockAt(Framework::Vec3<int> position, Item* zUsedItem) const override;
- virtual const Block* zDefault() const override;
- };
- REGISTER(NoBlockBlockType, BlockType)
- class AirBlock : public Block
- {
- public:
- static const AirBlock INSTANCE;
- protected:
- AirBlock();
- virtual bool onTick(TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- };
- class AirBlockBlockType : public NoBlockBlockType
- {
- REGISTRABLE(AirBlockBlockType)
- protected:
- AirBlockBlockType();
- virtual const Block* zDefault() const override;
- };
- REGISTER(AirBlockBlockType, BlockType)
|