35class ScriptItemStack {
39 ::ll::TypedStorage<8, 128, ::ItemInstance> mItemInstance;
40 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
41 ::ll::TypedStorage<8, 32, ::Scripting::WeakTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>>
43 ::ll::TypedStorage<8, 32, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>> mItemType;
64 MCAPI ScriptItemStack(
70 MCAPI ScriptItemStack(
77 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
78 _validateDynamicProperty(
79 ::std::string
const& key,
80 ::std::variant<double, float, bool, ::std::string, ::Vec3>
const& value
83 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
86 MCAPI ::std::vector<::std::string> getCanDestroy()
const;
88 MCAPI ::std::vector<::std::string> getCanPlaceOn()
const;
90 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
92 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
93 ::std::string_view
id,
97 MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
98 getComponents(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
bool includeCustom);
100 MCAPI ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
107 MCAPI ::Scripting::Result<::std::string, ::Scripting::EngineError> getLocalizationKey()
const;
109 MCAPI ::std::vector<::std::string> getLore()
const;
111 MCAPI ::std::optional<::std::string> getNameTag()
const;
113 MCAPI ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface> getRawLore()
const;
115 MCAPI ::std::vector<::std::string> getTags()
const;
117 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType> getType()
const;
119 MCAPI ::std::string getTypeId()
const;
121 MCAPI
bool hasComponent(
122 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
123 ::std::string_view
id,
127 MCAPI
bool hasTag(::std::string
const& tag)
const;
130 ::std::string itemName,
131 ::std::optional<::std::unordered_map<::std::string, ::std::variant<int, ::std::string, bool>>> properties
138 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError> setAmount(
int amount);
140 MCAPI ::Scripting::Result_deprecated<void>
141 setCanDestroy(::std::optional<::std::vector<::std::string>>
const& blockIdentifiers);
143 MCAPI ::Scripting::Result_deprecated<void>
144 setCanPlaceOn(::std::optional<::std::vector<::std::string>>
const& blockIdentifiers);
146 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
147 setDynamicProperties(
149 ::std::unordered_map<
151 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>>
const& values
154 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
157 ::std::string
const& key,
158 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
const& optionalValue
161 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::Error> setLore(
163 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>>>
const&
167 MCAPI ::Scripting::Result_deprecated<void> setNameTag(::std::optional<::std::string> nameTag);
169 MCAPI
void setNameTagV010(::std::optional<::std::string> nameTag);
171 MCAPI ~ScriptItemStack();
177 MCAPI static ::Scripting::ClassBinding bind(
183 MCAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
186 MCAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>>
189 MCAPI static ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface>
190 createRawLoreVector(::std::vector<::std::string> lore);
192 MCAPI static ::std::optional<::std::vector<::std::string>> tryCreateLoreVector(
193 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>>
const&
195 ::std::string& errorMessage
198 MCAPI static ::std::optional<::Scripting::ArgumentOutOfBoundsError>
199 validateLoreLength(::std::vector<::std::string>
const& loreList);
Definition ContextConfig.h:20