forked from Kolyah35/minecraft-pe-0.6.1
the whole game
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user