1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #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, int dimensionId) 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;
- public:
- 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)
|