12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #pragma once
- #include "Block.h"
- #include "BlockType.h"
- class NoBlockBlockType : public BlockType
- {
- private:
- const Block* defaultB;
- protected:
- virtual Block* createBlock(
- Framework::Vec3<int> position, int dimensionId) 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,
- int dimensionId,
- Item* zUsedItem) const override;
- virtual const Block* zDefault() const override;
- public:
- NoBlockBlockType(const Block* defaultB, Framework::Text name);
- virtual ItemType* createItemType() const override;
- };
- 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 AirBlock : public Block
- {
- public:
- static const AirBlock INSTANCE;
- protected:
- AirBlock();
- virtual bool onTick(
- TickQueue* zQueue, int numTicks, bool& blocked) override;
- virtual void onPostTick() override;
- };
|