123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #include "NoBlock.h"
- NoBlockBlockType::NoBlockBlockType(const Block* defaultB, Framework::Text name)
- : BlockType(),
- defaultB(defaultB)
- {
- setModel(new ModelInfo("", Framework::RCArray<Framework::Text>(), 0, 1.f));
- setNeedModelSubscription(false);
- setInitialMaxHP(1);
- setLightSource(false);
- setName(name);
- setNeedsClientInstance(false);
- setMapColor(0);
- setHardness(0.f);
- }
- ItemType* NoBlockBlockType::createItemType() const
- {
- return 0;
- }
- Block* NoBlockBlockType::createBlock(
- Framework::Vec3<int> position, int dimensionId) const
- {
- return 0;
- }
- Item* NoBlockBlockType::createItem() const
- {
- return 0;
- }
- Block* NoBlockBlockType::loadBlock(Framework::Vec3<int> position,
- Framework::StreamReader* zReader,
- int dimensionId) const
- {
- return 0;
- }
- void NoBlockBlockType::saveBlock(
- Block* zBlock, Framework::StreamWriter* zWriter) const
- {}
- Item* NoBlockBlockType::getItemFromBlock(Block* zBlock) const
- {
- return 0;
- }
- Block* NoBlockBlockType::createBlockAt(
- Framework::Vec3<int> position, int dimensionId, Item* zUsedItem) const
- {
- return 0;
- }
- const Block* NoBlockBlockType::zDefault() const
- {
- return defaultB;
- }
- NoBlock::NoBlock()
- : Block(BlockTypeEnum::NO_BLOCK, {0, 0, 0}, 0, false)
- {
- transparent = 0;
- passable = 0;
- hp = 0;
- maxHP = 0;
- hardness = 0;
- }
- bool NoBlock::onTick(TickQueue* zQueue, int numTicks, bool& blocked)
- {
- return 0;
- }
- void NoBlock::onPostTick() {}
- const NoBlock NoBlock::INSTANCE;
- AirBlock::AirBlock()
- : Block(BlockTypeEnum::AIR, {0, 0, 0}, 0, false)
- {
- transparent = 1;
- passable = 1;
- hp = 0;
- maxHP = 0;
- hardness = 0;
- }
- bool AirBlock::onTick(TickQueue* zQueue, int numTicks, bool& blocked)
- {
- return 0;
- }
- void AirBlock::onPostTick() {}
- const AirBlock AirBlock::INSTANCE;
|