32class ScriptItemStack {
36 ::ll::TypedStorage<8, 128, ::ItemInstance> mItemInstance;
37 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
38 ::ll::TypedStorage<8, 32, ::Scripting::WeakTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>>
40 ::ll::TypedStorage<8, 32, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType>> mItemType;
61 MCAPI ScriptItemStack(
67 MCAPI ScriptItemStack(
74 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
75 _validateDynamicProperty(
76 ::std::string
const& key,
77 ::std::variant<double, float, bool, ::std::string, ::Vec3>
const& value
80 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
83 MCAPI ::std::vector<::std::string> getCanDestroy()
const;
85 MCAPI ::std::vector<::std::string> getCanPlaceOn()
const;
87 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
89 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
90 ::std::string_view
id,
94 MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
95 getComponents(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
bool includeCustom);
97 MCAPI ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
104 MCAPI ::Scripting::Result<::std::string, ::Scripting::EngineError> getLocalizationKey()
const;
106 MCAPI ::std::vector<::std::string> getLore()
const;
108 MCAPI ::std::optional<::std::string> getNameTag()
const;
110 MCAPI ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface> getRawLore()
const;
112 MCAPI ::std::vector<::std::string> getTags()
const;
114 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType> getType()
const;
116 MCAPI ::std::string getTypeId()
const;
118 MCAPI
bool hasComponent(
119 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
120 ::std::string_view
id,
124 MCAPI
bool hasTag(::std::string
const& tag)
const;
127 ::std::string itemName,
128 ::std::optional<::std::unordered_map<::std::string, ::std::variant<int, ::std::string, bool>>> properties
135 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError> setAmount(
int amount);
137 MCAPI ::Scripting::Result_deprecated<void>
138 setCanDestroy(::std::optional<::std::vector<::std::string>>
const& blockIdentifiers);
140 MCAPI ::Scripting::Result_deprecated<void>
141 setCanPlaceOn(::std::optional<::std::vector<::std::string>>
const& blockIdentifiers);
143 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
144 setDynamicProperties(
146 ::std::unordered_map<
148 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>>
const& values
151 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
154 ::std::string
const& key,
155 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
const& optionalValue
158 MCAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::Error> setLore(
160 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>>>
const&
164 MCAPI ::Scripting::Result_deprecated<void> setNameTag(::std::optional<::std::string> nameTag);
166 MCAPI
void setNameTagV010(::std::optional<::std::string> nameTag);
168 MCAPI ~ScriptItemStack();
174 MCAPI static ::Scripting::ClassBinding bind(
175 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents>& itemComponents,
179 MCAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
182 MCAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>>
185 MCAPI static ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface>
186 createRawLoreVector(::std::vector<::std::string> lore);
188 MCAPI static ::std::optional<::std::vector<::std::string>> tryCreateLoreVector(
189 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>>
const&
191 ::std::string& errorMessage
194 MCAPI static ::std::optional<::Scripting::ArgumentOutOfBoundsError>
195 validateLoreLength(::std::vector<::std::string>
const& loreList);
Definition ContextConfig.h:20