diff --git a/src/mc/world/item/ItemInstance.h b/src/mc/world/item/ItemInstance.h index 11904b44a9..74c8b56cae 100644 --- a/src/mc/world/item/ItemInstance.h +++ b/src/mc/world/item/ItemInstance.h @@ -39,13 +39,14 @@ class ItemInstance : public ::ItemStackBase { MCAPI ItemInstance(::ItemInstance const& rhs); - MCAPI ItemInstance(::BlockLegacy const& block, int count); + MCAPI ItemInstance(::BlockLegacy const& block, int count = 1); - MCAPI ItemInstance(::Block const& block, int count, ::CompoundTag const* _userData); + MCAPI ItemInstance(::Block const& block, int count = 1, ::CompoundTag const* _userData = nullptr); - MCAPI ItemInstance(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI ItemInstance(::Item const& item, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); - MCAPI ItemInstance(::std::string_view name, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI + ItemInstance(::std::string_view name, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); MCAPI ::ItemInstance clone() const; diff --git a/src/mc/world/item/ItemStack.h b/src/mc/world/item/ItemStack.h index f286c701de..7c3591cbf6 100644 --- a/src/mc/world/item/ItemStack.h +++ b/src/mc/world/item/ItemStack.h @@ -73,13 +73,13 @@ class ItemStack : public ::ItemStackBase { MCAPI explicit ItemStack(::ItemInstance const& rhs); - MCAPI ItemStack(::BlockLegacy const& block, int count); + MCAPI ItemStack(::BlockLegacy const& block, int count = 1); - MCAPI ItemStack(::Block const& block, int count, ::CompoundTag const* _userData); + MCAPI ItemStack(::Block const& block, int count = 1, ::CompoundTag const* _userData = nullptr); - MCAPI ItemStack(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI ItemStack(::Item const& item, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); - MCAPI ItemStack(::std::string_view name, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI ItemStack(::std::string_view name, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); MCAPI void _assignNetIdVariant(::ItemStack const& fromItem) const; diff --git a/src/mc/world/item/ItemStackBase.h b/src/mc/world/item/ItemStackBase.h index 4431d8dcea..72c803606a 100644 --- a/src/mc/world/item/ItemStackBase.h +++ b/src/mc/world/item/ItemStackBase.h @@ -119,11 +119,12 @@ class ItemStackBase { MCAPI ItemStackBase(::BlockLegacy const& block, int count); - MCAPI ItemStackBase(::Block const& block, int count, ::CompoundTag const* _userData); + MCAPI ItemStackBase(::Block const& block, int count = 1, ::CompoundTag const* _userData = nullptr); - MCAPI ItemStackBase(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI ItemStackBase(::Item const& item, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); - MCAPI ItemStackBase(::std::string_view name, int count, int auxValue, ::CompoundTag const* _userData); + MCAPI + ItemStackBase(::std::string_view name, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr); MCAPI void _addCustomUserDataCommon(::std::unique_ptr<::CompoundTag>&& tag);