(11-24-2012, 11:50 PM)Luksor Wrote:How?(11-24-2012, 11:43 PM)Jers Wrote: I wanted to fix it, but I have not found BlockMycelium.hThere was no such file, I added it.
I Add BlockMycelium.h
Code:
#pragma once
#include "BlockHandler.h" //Это по любому нужно
class cBlockMyceliumHandler :
public cBlockHandler
{
public:
cBlockMyceliumHandler(BLOCKTYPE a_BlockType)
: cBlockHandler(a_BlockType)
{
}
virtual const char * GetStepSound(void) override//Я тут получаю звук для блока
{
return "step.gravel";
}
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override//Тут при ломании блока появляется земля, но смотри
{
a_Pickups.push_back(cItem(E_ITEM_DIRT, 1, 0));
}
} ;
Code:
#include "BlockMycelium.h"
Code:
case E_BLOCK_MYCELIUM: return new cBlockMyceliumHandler (a_BlockType);