50 if (
name !=
"default")
59 const std::string without_minecraft =
name.substr(10);
62 if (sub_parts.size() == 1 && sub_parts[0] ==
"shears")
69 if (sub_parts.size() == 1 || sub_parts.size() > 2)
76 if (sub_parts[1] ==
"axe")
80 else if (sub_parts[1] ==
"hoe")
84 else if (sub_parts[1] ==
"pickaxe")
88 else if (sub_parts[1] ==
"shovel")
92 else if (sub_parts[1] ==
"sword")
105 if (sub_parts[0] ==
"wooden")
109 else if (sub_parts[0] ==
"golden")
113 else if (sub_parts[0] ==
"stone")
117 else if (sub_parts[0] ==
"iron")
121 else if (sub_parts[0] ==
"diamond")
125#if PROTOCOL_VERSION > 578
126 else if (sub_parts[0] ==
"netherite")
#define LOG_WARNING(osstream)
void LoadTypeAndMaterialFromName()
unsigned char GetStackSize() const
Item(const ItemProperties &props)
ToolMaterial GetToolMaterial() const
ToolType GetToolType() const
int GetMaxDurability() const
Get the max durability of this item.
ToolMaterial tool_material
const std::string & GetName() const
bool StartsWith(const std::string &mainStr, const std::string &toMatch)
std::vector< std::string > SplitString(const std::string &s, const char delimiter)