Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ItemStackBase Class Referenceabstract
Inheritance diagram for ItemStackBase:

Classes

struct  ComparisonOptions

Public Member Functions

LLNDAPI std::string getTypeName () const
LLNDAPI std::string getDescriptionName () const
LLNDAPI bool isEnchanted () const
LLAPI bool removeEnchants () const
LLAPI void deserializeComponents (IDataInput &input)
LLAPI bool operator== (ItemStackBase const &other) const
LLNDAPI short getId () const
LLNDAPI short getAuxValue () const
LLAPI void setDamageValue (short newDamage)
void add (int count)
void remove (int count)
virtual void reinit (::Item const &item, int count, int auxValue)=0
virtual void reinit (::Block const &block, int count)=0
virtual void reinit (::std::string_view const name, int count, int auxValue)=0
virtual void setNull (::std::optional<::std::string > reason)
virtual operator bool () const
virtual::std::string toString () const
virtual::std::string toDebugString () const
MCAPI ItemStackBase (::RecipeIngredient const &ingredient)
MCAPI ItemStackBase (::ItemStackBase const &rhs)
MCAPI ItemStackBase (::Block const &block, int count=1, ::CompoundTag const *_userData=nullptr)
MCAPI ItemStackBase (::Item const &item, int count=1, int auxValue=0, ::CompoundTag const *_userData=nullptr)
MCAPI ItemStackBase (::std::string_view name, int count=1, int auxValue=0, ::CompoundTag const *_userData=nullptr)
MCAPI void _addCustomUserDataCommon (::std::unique_ptr<::CompoundTag > &&tag)
MCAPI void _checkForItemWorldCompatibility ()
MCAPI void _cloneComponents (::ItemStackBase const &other)
MCAPI::std::string _getHoverFormattingPrefix () const
MCAPI bool _isInstance (::std::string_view itemName) const
MCAPI void _loadItem (::CompoundTag const &compoundTag)
MCAPI void _setChargedItem (::ItemInstance const &item)
MCAPI void _updateCompareHashes ()
MCAPI bool addComponents (::Json::Value const &root, ::std::string &errorMsg)
MCAPI void addCustomUserData (::ContainerComponent const &containerComponent)
MCAPI void addCustomUserData (::BlockActor &blockEntity, ::BlockSource &region)
MCAPI void clearCustomLore ()
MCAPI::ItemEnchants constructItemEnchantsFromUserData () const
MCAPI::SharedTypes::Legacy::ArmorSlot getArmorSlot () const
MCAPI int getBaseRepairCost () const
MCAPI::mce::Color getColor () const
MCAPI ::std::vector<::std::string > getCustomLore () const
MCAPI::std::string getCustomName () const
MCAPI short getDamageValue () const
MCAPI::std::string getDescriptionId () const
MCAPI::ItemDescriptor getDescriptor () const
MCAPI ::std::unique_ptr<::DynamicProperties > getDynamicProperties () const
MCAPI ::std::optional<::std::variant< double, float, bool, ::std::string, ::Vec3 > > getDynamicProperty (::std::string const &key, ::std::string const &collectionName) const
MCAPI int getIdAux () const
MCAPI uchar getMaxStackSize () const
MCAPI::std::string getName () const
MCAPI float getPickupPopPercentage () const
MCAPI::std::string getRawNameId () const
MCAPI::Bedrock::Safety::RedactableString getRedactedCustomName () const
MCAPI::Bedrock::Safety::RedactableString getRedactedHoverName () const
MCAPI::Bedrock::Safety::RedactableString getRedactedName () const
MCAPI bool hasChargedItem () const
MCAPI bool hasSameAuxValue (::ItemStackBase const &other) const
MCAPI bool hasSameUserData (::ItemStackBase const &other) const
MCAPI bool hurtAndBreak (int deltaDamage, ::Actor *owner)
MCAPI void init (::BlockType const &block, int count)
MCAPI void init (::Item const &item, int count, int auxValue, ::CompoundTag const *userData, bool doRemap)
MCAPI bool isArmorItem () const
MCAPI bool isDamageableItem () const
MCAPI bool isDamaged () const
MCAPI bool isEnchantingBook () const
MCAPI bool isFullStack () const
MCAPI bool isHorseArmorItem () const
MCAPI bool isHumanoidWearableItem () const
MCAPI bool isInstance (::HashedString const &itemName, bool useItemLookup) const
MCAPI bool isNull () const
MCAPI bool isOneOfBlockInstances (::std::vector<::std::reference_wrapper<::HashedString const > > const &blockTypeIds) const
MCAPI bool isOneOfInstances (::std::initializer_list<::std::reference_wrapper<::HashedString const > > items, bool useItemLookup) const
MCAPI bool isPotionItem () const
MCAPI bool isStackable () const
MCAPI bool isStackable (::ItemStackBase const &other) const
MCAPI bool matchesEitherWearableCase (::CompoundTag const *userData) const
MCAPI bool matchesItem (::ItemStackBase const &other) const
MCAPI::ItemStackBase & operator= (::ItemStackBase const &rhs)
MCAPI void resetHoverName ()
MCAPI bool sameItem (::ItemStackBase const &other, ::ItemStackBase::ComparisonOptions const &options) const
MCAPI ::std::unique_ptr<::CompoundTag > save (::SaveContext const &saveContext) const
MCAPI void saveEnchantsToUserData (::ItemEnchants const &enchant)
MCAPI void serializeComponents (::IDataOutput &output) const
MCAPI void set (int inCount)
MCAPI void setChargedItem (::ItemInstance const &instance, bool isSwapping)
MCAPI void setCustomLore (::std::vector<::std::string > const &lore)
MCAPI void setCustomName (::Bedrock::Safety::RedactableString const &name)
MCAPI void setDynamicProperty (::std::string const &key, ::std::variant< double, float, bool, ::std::string, ::Vec3 > const &value, ::std::string const &collectionName)
MCAPI void setJustBrewed (bool justBrewed)
MCAPI void setRepairCost (int cost)
MCAPI void setUnbreakable (bool isUnbreakable)
MCAPI void setUserData (::std::unique_ptr<::CompoundTag > tag)
MCAPI bool shouldVanish () const
MCAPI void startCooldown (::Player &player, ::SharedTypes::ItemCooldownType type) const
MCAPI void * $ctor (::RecipeIngredient const &ingredient)
MCAPI void * $ctor (::ItemStackBase const &rhs)
MCAPI void * $ctor (::Block const &block, int count, ::CompoundTag const *_userData)
MCAPI void * $ctor (::Item const &item, int count, int auxValue, ::CompoundTag const *_userData)
MCAPI void * $ctor (::std::string_view name, int count, int auxValue, ::CompoundTag const *_userData)
MCAPI void $dtor ()
MCAPI void $setNull (::std::optional<::std::string > reason)
MCAPI::std::string $toString () const
MCAPI::std::string $toDebugString () const

Static Public Member Functions

static MCAPI bool _loadBlocksForCanPlaceOnCanDestroy (::std::vector<::BlockType const * > &blockList, ::std::string const &blockName)
static MCAPI ::ItemStackBase::ComparisonOptions const & COMPARISONOPTIONS_AUXANDRELEVANTUSERDATA ()
static MCAPI ::ItemStackBase::ComparisonOptions const & COMPARISONOPTIONS_RELEVANTUSERDATA ()
static MCAPI ::std::string const & TAG_CAN_DESTROY ()
static MCAPI ::std::string const & TAG_CAN_PLACE_ON ()
static MCAPI ::std::string const & TAG_CHARGED_ITEM ()
static MCAPI ::std::string const & TAG_DISPLAY ()
static MCAPI ::std::string const & TAG_DISPLAY_FILTERED_NAME ()
static MCAPI ::std::string const & TAG_DISPLAY_NAME ()
static MCAPI ::std::string const & TAG_ENCHANTS ()
static MCAPI ::std::string const & TAG_LORE ()
static MCAPI ::std::string const & TAG_REPAIR_COST ()
static MCAPI ::std::string const & TAG_STORE_CAN_DESTROY ()
static MCAPI ::std::string const & TAG_STORE_CAN_PLACE_ON ()
static MCAPI ::std::string const & TAG_UNBREAKABLE ()
static MCAPI void ** $vftable ()

Public Attributes

::WeakPtr<::Item > mItem
::std::unique_ptr<::CompoundTag > mUserData
::Block const * mBlock
short mAuxValue
uchar mCount
bool mValid_DeprecatedSeeComment
bool mShowPickUp
bool mWasPickedUp
::std::chrono::steady_clock::time_point mPickupTime
::std::vector<::BlockType const * > mCanPlaceOn
uint64 mCanPlaceOnHash
::std::vector<::BlockType const * > mCanDestroy
uint64 mCanDestroyHash
::Tick mBlockingTick
::std::unique_ptr<::ItemInstance > mChargedItem

Constructor & Destructor Documentation

◆ ItemStackBase() [1/3]

MCAPI ItemStackBase::ItemStackBase ( ::RecipeIngredient const & ingredient)
explicit
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ ItemStackBase() [2/3]

MCAPI ItemStackBase::ItemStackBase ( ::ItemStackBase const & rhs)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ ItemStackBase() [3/3]

MCAPI ItemStackBase::ItemStackBase ( ::Item const & item,
int count = 1,
int auxValue = 0,
::CompoundTag const * _userData = nullptr )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

Member Function Documentation

◆ _addCustomUserDataCommon()

MCAPI void ItemStackBase::_addCustomUserDataCommon ( ::std::unique_ptr<::CompoundTag > && tag)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _checkForItemWorldCompatibility()

MCAPI void ItemStackBase::_checkForItemWorldCompatibility ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _cloneComponents()

MCAPI void ItemStackBase::_cloneComponents ( ::ItemStackBase const & other)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _getHoverFormattingPrefix()

MCAPI::std::string ItemStackBase::_getHoverFormattingPrefix ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _isInstance()

MCAPI bool ItemStackBase::_isInstance ( ::std::string_view itemName) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _setChargedItem()

MCAPI void ItemStackBase::_setChargedItem ( ::ItemInstance const & item)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ getPickupPopPercentage()

MCAPI float ItemStackBase::getPickupPopPercentage ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ getRedactedCustomName()

MCAPI::Bedrock::Safety::RedactableString ItemStackBase::getRedactedCustomName ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ hasChargedItem()

MCAPI bool ItemStackBase::hasChargedItem ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ init() [1/2]

MCAPI void ItemStackBase::init ( ::BlockType const & block,
int count )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ init() [2/2]

MCAPI void ItemStackBase::init ( ::Item const & item,
int count,
int auxValue,
::CompoundTag const * userData,
bool doRemap )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ isOneOfBlockInstances()

MCAPI bool ItemStackBase::isOneOfBlockInstances ( ::std::vector<::std::reference_wrapper<::HashedString const > > const & blockTypeIds) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ isOneOfInstances()

MCAPI bool ItemStackBase::isOneOfInstances ( ::std::initializer_list<::std::reference_wrapper<::HashedString const > > items,
bool useItemLookup ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ matchesEitherWearableCase()

MCAPI bool ItemStackBase::matchesEitherWearableCase ( ::CompoundTag const * userData) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ serializeComponents()

MCAPI void ItemStackBase::serializeComponents ( ::IDataOutput & output) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ setChargedItem()

MCAPI void ItemStackBase::setChargedItem ( ::ItemInstance const & instance,
bool isSwapping )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ setJustBrewed()

MCAPI void ItemStackBase::setJustBrewed ( bool justBrewed)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ shouldVanish()

MCAPI bool ItemStackBase::shouldVanish ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ COMPARISONOPTIONS_AUXANDRELEVANTUSERDATA()

MCAPI ::ItemStackBase::ComparisonOptions const & ItemStackBase::COMPARISONOPTIONS_AUXANDRELEVANTUSERDATA ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ COMPARISONOPTIONS_RELEVANTUSERDATA()

MCAPI ::ItemStackBase::ComparisonOptions const & ItemStackBase::COMPARISONOPTIONS_RELEVANTUSERDATA ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_CAN_DESTROY()

MCAPI ::std::string const & ItemStackBase::TAG_CAN_DESTROY ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_CAN_PLACE_ON()

MCAPI ::std::string const & ItemStackBase::TAG_CAN_PLACE_ON ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_CHARGED_ITEM()

MCAPI ::std::string const & ItemStackBase::TAG_CHARGED_ITEM ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_DISPLAY()

MCAPI ::std::string const & ItemStackBase::TAG_DISPLAY ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_DISPLAY_FILTERED_NAME()

MCAPI ::std::string const & ItemStackBase::TAG_DISPLAY_FILTERED_NAME ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_DISPLAY_NAME()

MCAPI ::std::string const & ItemStackBase::TAG_DISPLAY_NAME ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_LORE()

MCAPI ::std::string const & ItemStackBase::TAG_LORE ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_REPAIR_COST()

MCAPI ::std::string const & ItemStackBase::TAG_REPAIR_COST ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_STORE_CAN_DESTROY()

MCAPI ::std::string const & ItemStackBase::TAG_STORE_CAN_DESTROY ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_STORE_CAN_PLACE_ON()

MCAPI ::std::string const & ItemStackBase::TAG_STORE_CAN_PLACE_ON ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ TAG_UNBREAKABLE()

MCAPI ::std::string const & ItemStackBase::TAG_UNBREAKABLE ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor() [1/3]

MCAPI void * ItemStackBase::$ctor ( ::RecipeIngredient const & ingredient)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor() [2/3]

MCAPI void * ItemStackBase::$ctor ( ::ItemStackBase const & rhs)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor() [3/3]

MCAPI void * ItemStackBase::$ctor ( ::Item const & item,
int count,
int auxValue,
::CompoundTag const * _userData )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable()

MCAPI void ** ItemStackBase::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: