| 32 | |
| 33 | |
| 34 | virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override |
| 35 | { |
| 36 | NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ); |
| 37 | |
| 38 | if ((Meta & 0x08) != 0) |
| 39 | { |
| 40 | int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; |
| 41 | int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; |
| 42 | a_Chunk.GetWorld()->GrowTree(BlockX, a_RelY, BlockZ); |
| 43 | } |
| 44 | else |
| 45 | { |
| 46 | a_Chunk.SetMeta(a_RelX, a_RelY, a_RelZ, Meta | 0x08); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | |
| 51 | virtual const char * GetStepSound(void) override |