Class endstone::ItemType¶
ClassList > endstone > ItemType
Represents an item type.
#include <endstone/inventory/item_type.h>
Public Functions¶
Type | Name |
---|---|
virtual std::string_view | getId () const = 0 Return the identifier of this item type. |
virtual NamespacedKey | getKey () const = 0 Return the namespaced identifier of this item type. |
virtual int | getMaxDurability () const = 0 Gets the maximum durability of this item type. |
virtual int | getMaxStackSize () const = 0 Gets the maximum amount of this item type that can be held in a stack. |
virtual std::string_view | getTranslationKey () const = 0 Get the translation key, suitable for use in a translation component. |
bool | operator!= (const std::string_view other) const |
bool | operator!= (const ItemType & other) const |
bool | operator== (const std::string_view other) const |
bool | operator== (const ItemType & other) const |
virtual | ~ItemType () = default |
Public Static Functions¶
Type | Name |
---|---|
const ItemType * | get (std::string_view name) Attempts to get the ItemType with the given name. |
Public Functions Documentation¶
function getId¶
Return the identifier of this item type.
Returns:
this item's identifier
function getKey¶
Return the namespaced identifier of this item type.
Returns:
this item's key
function getMaxDurability¶
Gets the maximum durability of this item type.
Returns:
Maximum durability for this item type
function getMaxStackSize¶
Gets the maximum amount of this item type that can be held in a stack.
Returns:
Maximum stack size for this item type
function getTranslationKey¶
Get the translation key, suitable for use in a translation component.
Returns:
the translation key
function operator!=¶
function operator!=¶
function operator==¶
function operator==¶
function ~ItemType¶
Public Static Functions Documentation¶
function get¶
Attempts to get the ItemType with the given name.
Note:
This is a normal lookup, names must be the precise name.
Parameters:
name
Name of the item_type to get
Returns:
ItemType if found, or nullptr
The documentation for this class was generated from the following file include/endstone/inventory/item_type.h