Skip to content

Class endstone::ItemType

ClassList > endstone > ItemType

Public Static Attributes

Type Name
constexpr auto Air = ItemTypeId::minecraft("air")

Public Functions

Type Name
virtual ItemTypeId getId () const = 0
Return the 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 getTranslationKey () const = 0
Get the translation key, suitable for use in a translation component.
virtual std::string getTranslationKey (int data) const = 0
Get the translation key, suitable for use in a translation component.
operator ItemTypeId () const
bool operator!= (const ItemTypeId & other) const
bool operator!= (const ItemType & other) const
bool operator== (const ItemTypeId & other) const
bool operator== (const ItemType & other) const
virtual ~ItemType () = default

Public Static Attributes Documentation

variable Air

constexpr auto endstone::ItemType::Air;

Public Functions Documentation

function getId

Return the identifier of this item type.

virtual ItemTypeId endstone::ItemType::getId () const = 0

Returns:

this item's identifier


function getMaxDurability

Gets the maximum durability of this item type.

virtual int endstone::ItemType::getMaxDurability () const = 0

Returns:

Maximum durability for this item type


function getMaxStackSize

Gets the maximum amount of this item type that can be held in a stack.

virtual int endstone::ItemType::getMaxStackSize () const = 0

Returns:

Maximum stack size for this item type


function getTranslationKey [½]

Get the translation key, suitable for use in a translation component.

virtual std::string endstone::ItemType::getTranslationKey () const = 0

Returns:

the translation key


function getTranslationKey [2/2]

Get the translation key, suitable for use in a translation component.

virtual std::string endstone::ItemType::getTranslationKey (
    int data
) const = 0

Parameters:

  • data Data for this item type

Returns:

the translation key


function operator ItemTypeId

inline endstone::ItemType::operator ItemTypeId () const

function operator!=

inline bool endstone::ItemType::operator!= (
    const  ItemTypeId & other
) const

function operator!=

inline bool endstone::ItemType::operator!= (
    const  ItemType & other
) const

function operator==

inline bool endstone::ItemType::operator== (
    const  ItemTypeId & other
) const

function operator==

inline bool endstone::ItemType::operator== (
    const  ItemType & other
) const

function ~ItemType

virtual endstone::ItemType::~ItemType () = default


The documentation for this class was generated from the following file include/endstone/inventory/item_type.h