forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
27
src/world/level/tile/MelonTile.cpp
Executable file
27
src/world/level/tile/MelonTile.cpp
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#include "MelonTile.h"
|
||||
#include "../material/Material.h"
|
||||
#include "../../../util/Random.h"
|
||||
#include "../../Facing.h"
|
||||
#include "../../item/Item.h"
|
||||
MelonTile::MelonTile( int id )
|
||||
:super(id, Material::vegetable){
|
||||
tex = TEX;
|
||||
}
|
||||
|
||||
int MelonTile::getTexture( LevelSource* level, int x, int y, int z, int face ) {
|
||||
return getTexture(face);
|
||||
}
|
||||
|
||||
int MelonTile::getTexture( int face ) {
|
||||
if(face == Facing::UP || face == Facing::DOWN) return TEX_TOP;
|
||||
return TEX;
|
||||
}
|
||||
|
||||
int MelonTile::getResource( int data, Random* random ) {
|
||||
return Item::melon->id;
|
||||
}
|
||||
|
||||
int MelonTile::getResourceCount( Random* random ) {
|
||||
return 3 + random->nextInt(5);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue