|
@@ -94,7 +94,7 @@ GrowingPlantBlock* GrowingPlantBlock::addGrowthState(GrowthState state)
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
-GrowingPlantlockType::GrowingPlantlockType(int typeId,
|
|
|
+GrowingPlantBlockType::GrowingPlantBlockType(int typeId,
|
|
|
ModelInfo model,
|
|
|
const char* name,
|
|
|
int blockTypeAfterGrowth,
|
|
@@ -113,25 +113,22 @@ GrowingPlantlockType::GrowingPlantlockType(int typeId,
|
|
|
ticksNeeded(ticksNeeded)
|
|
|
{}
|
|
|
|
|
|
-GrowingPlantlockType* GrowingPlantlockType::setHardness(float hardness)
|
|
|
+GrowingPlantBlockType* GrowingPlantBlockType::setHardness(float hardness)
|
|
|
{
|
|
|
this->hardness = hardness;
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
-GrowingPlantlockType* GrowingPlantlockType::addGrowthState(
|
|
|
+GrowingPlantBlockType* GrowingPlantBlockType::addGrowthState(
|
|
|
float growthPercentage, ModelInfo model)
|
|
|
{
|
|
|
states.add(GrowthState(growthPercentage, model));
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
-void GrowingPlantlockType::createSuperBlock(Block* zBlock, Item* zItem) const
|
|
|
+void GrowingPlantBlockType::createSuperBlock(Block* zBlock, Item* zItem) const
|
|
|
{
|
|
|
- GrowingPlantlockType* block = dynamic_cast<GrowingPlantlockType*>(zBlock);
|
|
|
- if (!block)
|
|
|
- throw "TreeSeblingBlockType::createSuperBlock was called with a block "
|
|
|
- "witch is not an instance of TreeSeblingBlock";
|
|
|
+ GrowingPlantBlock* block = dynamic_cast<GrowingPlantBlock*>(zBlock);
|
|
|
block->transparent = transparent;
|
|
|
block->passable = passable;
|
|
|
block->hardness = hardness;
|
|
@@ -141,7 +138,7 @@ void GrowingPlantlockType::createSuperBlock(Block* zBlock, Item* zItem) const
|
|
|
BlockType::createSuperBlock(zBlock, zItem);
|
|
|
}
|
|
|
|
|
|
-void GrowingPlantlockType::loadSuperBlock(
|
|
|
+void GrowingPlantBlockType::loadSuperBlock(
|
|
|
Block* zBlock, Framework::StreamReader* zReader, int dimensionId) const
|
|
|
{
|
|
|
BlockType::loadSuperBlock(zBlock, zReader, dimensionId);
|
|
@@ -149,7 +146,7 @@ void GrowingPlantlockType::loadSuperBlock(
|
|
|
zReader->lese((char*)&block->seblingTicks, 4);
|
|
|
}
|
|
|
|
|
|
-void GrowingPlantlockType::saveSuperBlock(
|
|
|
+void GrowingPlantBlockType::saveSuperBlock(
|
|
|
Block* zBlock, Framework::StreamWriter* zWriter) const
|
|
|
{
|
|
|
BlockType::saveSuperBlock(zBlock, zWriter);
|
|
@@ -157,12 +154,12 @@ void GrowingPlantlockType::saveSuperBlock(
|
|
|
zWriter->schreibe((char*)&block->seblingTicks, 4);
|
|
|
}
|
|
|
|
|
|
-Item* GrowingPlantlockType::createItem() const
|
|
|
+Item* GrowingPlantBlockType::createItem() const
|
|
|
{
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-Block* GrowingPlantlockType::createBlock(Framework::Vec3<int> position) const
|
|
|
+Block* GrowingPlantBlockType::createBlock(Framework::Vec3<int> position) const
|
|
|
{
|
|
|
GrowingPlantBlock* block = new GrowingPlantBlock(getId(),
|
|
|
zTool,
|