the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "net.minecraft.world.item.h"
3#include "net.minecraft.world.entity.item.h"
4#include "net.minecraft.world.entity.player.h"
5#include "net.minecraft.world.h"
6#include "CoalItem.h"
7
8CoalItem::CoalItem(int id) : Item( id )
9{
10 setStackedByData(true);
11 setMaxDamage(0);
12}
13
14unsigned int CoalItem::getDescriptionId(shared_ptr<ItemInstance> instance)
15{
16 if (instance->getAuxValue() == CHAR_COAL)
17 {
18 return IDS_ITEM_CHARCOAL;
19 }
20 return IDS_ITEM_COAL;
21}
22
23Icon *CoalItem::getIcon(int auxValue)
24{
25 if (auxValue == CHAR_COAL)
26 {
27 return charcoalIcon;
28 }
29 return Item::getIcon(auxValue);
30}
31
32void CoalItem::registerIcons(IconRegister *iconRegister)
33{
34 Item::registerIcons(iconRegister);
35
36 charcoalIcon = iconRegister->registerIcon(L"charcoal");
37}