![]() |
Botcraft 1.21.4
|
#include <Item.hpp>
Public Member Functions | |
Item (const ItemProperties &props) | |
ItemId | GetId () const |
const std::string & | GetName () const |
unsigned char | GetStackSize () const |
ToolType | GetToolType () const |
ToolMaterial | GetToolMaterial () const |
int | GetMaxDurability () const |
Get the max durability of this item. | |
Private Member Functions | |
void | LoadTypeAndMaterialFromName () |
Private Attributes | |
ItemId | id |
std::string | name |
unsigned char | stack_size |
int | durability |
ToolType | tool_type |
ToolMaterial | tool_material |
Botcraft::Item::Item | ( | const ItemProperties & | props | ) |
Definition at line 7 of file Item.cpp.
References Botcraft::ItemProperties::durability, durability, Botcraft::ItemProperties::id, LoadTypeAndMaterialFromName(), Botcraft::ItemProperties::name, name, Botcraft::ItemProperties::stack_size, and stack_size.
ItemId Botcraft::Item::GetId | ( | ) | const |
Definition at line 16 of file Item.cpp.
References id.
Referenced by Botcraft::PhysicsManager::InputsToFly().
int Botcraft::Item::GetMaxDurability | ( | ) | const |
Get the max durability of this item.
Definition at line 41 of file Item.cpp.
References durability.
Referenced by Botcraft::PhysicsManager::InputsToFly().
const std::string & Botcraft::Item::GetName | ( | ) | const |
unsigned char Botcraft::Item::GetStackSize | ( | ) | const |
Definition at line 26 of file Item.cpp.
References stack_size.
ToolMaterial Botcraft::Item::GetToolMaterial | ( | ) | const |
Definition at line 36 of file Item.cpp.
References tool_material.
Referenced by Botcraft::DigImpl().
ToolType Botcraft::Item::GetToolType | ( | ) | const |
|
private |
Definition at line 46 of file Item.cpp.
References Botcraft::Axe, Botcraft::Diamond, Botcraft::Gold, Botcraft::Hoe, Botcraft::Iron, LOG_WARNING, name, Botcraft::Netherite, Botcraft::None, Botcraft::Pickaxe, Botcraft::Shears, Botcraft::Shovel, Botcraft::Utilities::SplitString(), Botcraft::Utilities::StartsWith(), Botcraft::Stone, Botcraft::Sword, tool_material, tool_type, and Botcraft::Wood.
Referenced by Item().
|
private |
Definition at line 48 of file Item.hpp.
Referenced by GetMaxDurability(), and Item().
|
private |
Definition at line 46 of file Item.hpp.
Referenced by GetName(), Item(), and LoadTypeAndMaterialFromName().
|
private |
Definition at line 47 of file Item.hpp.
Referenced by GetStackSize(), and Item().
|
private |
Definition at line 50 of file Item.hpp.
Referenced by GetToolMaterial(), and LoadTypeAndMaterialFromName().
|
private |
Definition at line 49 of file Item.hpp.
Referenced by GetToolType(), and LoadTypeAndMaterialFromName().