Files
MinecraftConsoles/Minecraft.World/CoalItem.cpp
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

23 lines
467 B
C++

using namespace std;
#include "stdafx.h"
#include "net.minecraft.world.item.h"
#include "net.minecraft.world.entity.item.h"
#include "net.minecraft.world.entity.player.h"
#include "CoalItem.h"
CoalItem::CoalItem(int id) : Item( id )
{
setStackedByData(true);
setMaxDamage(0);
}
unsigned int CoalItem::getDescriptionId(std::shared_ptr<ItemInstance> instance)
{
if (instance->getAuxValue() == CHAR_COAL)
{
return IDS_ITEM_CHARCOAL;
}
return IDS_ITEM_COAL;
}