forked from Kolyah35/minecraft-pe-0.6.1
the whole game
This commit is contained in:
29
src/world/item/CoalItem.h
Executable file
29
src/world/item/CoalItem.h
Executable file
@@ -0,0 +1,29 @@
|
||||
#ifndef NET_MINECRAFT_WORLD_ITEM__CoalItem_H__
|
||||
#define NET_MINECRAFT_WORLD_ITEM__CoalItem_H__
|
||||
|
||||
//package net.minecraft.world.item;
|
||||
|
||||
class CoalItem: public Item
|
||||
{
|
||||
typedef Item super;
|
||||
public:
|
||||
static const int STONE_COAL = 0;
|
||||
static const int CHAR_COAL = 1;
|
||||
|
||||
CoalItem(int id)
|
||||
: super(id)
|
||||
{
|
||||
setStackedByData(true);
|
||||
setMaxDamage(0);
|
||||
}
|
||||
|
||||
/*@Override*/
|
||||
std::string getDescriptionId(ItemInstance* instance) {
|
||||
if (instance->getAuxValue() == CHAR_COAL) {
|
||||
return ICON_DESCRIPTION_PREFIX + "charcoal";
|
||||
}
|
||||
return ICON_DESCRIPTION_PREFIX + "coal";
|
||||
}
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_WORLD_ITEM__CoalItem_H__*/
|
||||
Reference in New Issue
Block a user