LeviLamina
Loading...
Searching...
No Matches
ScriptItemStack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
8#include "mc/deps/scripting/runtime/Result.h"
9#include "mc/deps/scripting/runtime/Result_deprecated.h"
10
11// auto generated forward declare list
12// clang-format off
13class BaseGameVersion;
14class ItemStackBase;
15class Vec3;
16namespace ScriptModuleMinecraft { class IScriptItemCustomComponentReader; }
17namespace ScriptModuleMinecraft { class ScriptItemComponent; }
18namespace ScriptModuleMinecraft { class ScriptItemComponents; }
19namespace ScriptModuleMinecraft { class ScriptItemType; }
20namespace ScriptModuleMinecraft { struct ScriptPotionOptions; }
21namespace ScriptModuleMinecraft { struct ScriptRawMessageInterface; }
22namespace Scripting { class WeakLifetimeScope; }
23namespace Scripting { struct ArgumentOutOfBoundsError; }
24namespace Scripting { struct ClassBinding; }
25namespace Scripting { struct ContextConfig; }
26namespace Scripting { struct EngineError; }
27namespace Scripting { struct Error; }
28namespace Scripting { struct UnsupportedAPIError; }
29namespace Scripting { struct Version; }
30// clang-format on
31
32namespace ScriptModuleMinecraft {
33
35public:
36 // member variables
37 // NOLINTBEGIN
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
48
49public:
50 // member functions
51 // NOLINTBEGIN
53
55
58 ::ItemStackBase const& item,
60 );
61
65 int amount,
66 int data
67 );
68
69 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
71 ::std::string const& key,
72 ::std::variant<double, float, bool, ::std::string, ::Vec3> const& value
73 ) const;
74
75 MCNAPI void clearDynamicProperties(::Scripting::ContextConfig const& contextConfig);
76
77 MCNAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
79
80 MCNAPI ::std::vector<::std::string> getCanDestroy() const;
81
82 MCNAPI ::std::vector<::std::string> getCanPlaceOn() const;
83
84 MCNAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
86 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
87 ::std::string_view id,
88 bool includeCustom
89 );
90
91 MCNAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent>>
92 getComponents(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components, bool includeCustom);
93
94 MCNAPI ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
95 getDynamicProperty(::Scripting::ContextConfig const& contextConfig, ::std::string const& key);
96
97 MCNAPI ::std::vector<::std::string> getDynamicPropertyIds(::Scripting::ContextConfig const& contextConfig);
98
100
101 MCNAPI ::Scripting::Result<::std::string, ::Scripting::EngineError> getLocalizationKey() const;
102
103 MCNAPI ::std::vector<::std::string> getLore() const;
104
105 MCNAPI ::std::optional<::std::string> getNameTag() const;
106
107 MCNAPI ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface> getRawLore() const;
108
109 MCNAPI ::std::vector<::std::string> getTags() const;
110
111 MCNAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType> getType() const;
112
113 MCNAPI ::std::string getTypeId() const;
114
115 MCNAPI bool hasComponent(
116 ::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents> components,
117 ::std::string_view id,
118 bool includeCustom
119 );
120
121 MCNAPI bool hasTag(::std::string const& tag) const;
122
124
125 MCNAPI bool matches(
126 ::std::string itemName,
127 ::std::optional<::std::unordered_map<::std::string, ::std::variant<int, ::std::string, bool>>> properties
128 ) const;
129
130 MCNAPI ::ScriptModuleMinecraft::ScriptItemStack& operator=(::ScriptModuleMinecraft::ScriptItemStack const&);
131
132 MCNAPI ::ScriptModuleMinecraft::ScriptItemStack& operator=(::ScriptModuleMinecraft::ScriptItemStack&&);
133
134 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError> setAmount(int amount);
135
136 MCNAPI ::Scripting::Result_deprecated<void>
137 setCanDestroy(::std::optional<::std::vector<::std::string>> const& blockIdentifiers);
138
139 MCNAPI ::Scripting::Result_deprecated<void>
140 setCanPlaceOn(::std::optional<::std::vector<::std::string>> const& blockIdentifiers);
141
142 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
144 ::Scripting::ContextConfig const& contextConfig,
145 ::std::unordered_map<::std::string, ::std::variant<double, float, bool, ::std::string, ::Vec3>> const& values
146 );
147
148 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError>
150 ::Scripting::ContextConfig const& contextConfig,
151 ::std::string const& key,
152 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>> const& optionalValue
153 );
154
155 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::Error> setLoreBeta(
156 ::std::optional<
157 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>>> const&
158 loreVariantList
159 );
160
161 MCNAPI ::Scripting::Result<void, ::Scripting::ArgumentOutOfBoundsError>
162 setLoreStable(::std::optional<::std::vector<::std::string>> const& loreList);
163
164 MCNAPI void setLoreV010(::std::optional<::std::vector<::std::string>> const& loreList);
165
166 MCNAPI ::Scripting::Result_deprecated<void> setNameTag(::std::optional<::std::string> nameTag);
167
168 MCNAPI void setNameTagV010(::std::optional<::std::string> nameTag);
169
171 // NOLINTEND
172
173public:
174 // static functions
175 // NOLINTBEGIN
176 MCNAPI static ::Scripting::Result_deprecated<
179
180 MCNAPI static ::Scripting::ClassBinding bind(
181 ::BaseGameVersion const& baseGameVersion,
182 ::Scripting::Version const& version,
184 );
185
186 MCNAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>
188
189 MCNAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack>>
191
192 MCNAPI static ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface>
193 createRawLoreVector(::std::vector<::std::string> lore);
194
195 MCNAPI static ::std::optional<::std::vector<::std::string>> tryCreateLoreVector(
196 ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface>> const&
197 loreVariantList,
198 ::std::string& errorMessage
199 );
200
201 MCNAPI static ::std::optional<::Scripting::ArgumentOutOfBoundsError>
202 validateLoreLength(::std::vector<::std::string> const& loreList);
203 // NOLINTEND
204
205public:
206 // constructor thunks
207 // NOLINTBEGIN
209
211
212 MCNAPI void* $ctor(
214 ::ItemStackBase const& item,
216 );
217
218 MCNAPI void* $ctor(
221 int amount,
222 int data
223 );
224 // NOLINTEND
225
226public:
227 // destructor thunk
228 // NOLINTBEGIN
229 MCNAPI void $dtor();
230 // NOLINTEND
231};
232
233} // namespace ScriptModuleMinecraft
Definition BaseGameVersion.h:8
Definition ItemStackBase.h:35
Definition ScriptItemStack.h:34
MCAPI bool matches(::std::string itemName, ::std::optional<::std::unordered_map<::std::string, ::std::variant< int, ::std::string, bool > > > properties) const
MCAPI ::Scripting::Result<::std::string, ::Scripting::EngineError > getLocalizationKey() const
static MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack > createHandle(::Scripting::WeakLifetimeScope scope, ::ItemStackBase const &item)
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError > _validateDynamicProperty(::std::string const &key, ::std::variant< double, float, bool, ::std::string, ::Vec3 > const &value) const
MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent > > getComponent(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents > components, ::std::string_view id, bool includeCustom)
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError > setDynamicProperty(::Scripting::ContextConfig const &contextConfig, ::std::string const &key, ::std::optional<::std::variant< double, float, bool, ::std::string, ::Vec3 > > const &optionalValue)
static MCAPI ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface > createRawLoreVector(::std::vector<::std::string > lore)
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError > setAmount(int amount)
MCAPI void setNameTagV010(::std::optional<::std::string > nameTag)
MCAPI bool isStackableWith(::ScriptModuleMinecraft::ScriptItemStack const &other) const
MCAPI ::std::vector<::std::string > getTags() const
static MCAPI ::Scripting::ClassBinding bind(::BaseGameVersion const &baseGameVersion, ::Scripting::Version const &version, ::WeakRef<::ScriptModuleMinecraft::IScriptItemCustomComponentReader const > itemCustomComponentRegistry)
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::UnsupportedAPIError > setDynamicProperties(::Scripting::ContextConfig const &contextConfig, ::std::unordered_map<::std::string, ::std::variant< double, float, bool, ::std::string, ::Vec3 > > const &values)
MCAPI ScriptItemStack(::ScriptModuleMinecraft::ScriptItemStack &&)
MCAPI void setLoreV010(::std::optional<::std::vector<::std::string > > const &loreList)
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError, ::Scripting::Error > setLoreBeta(::std::optional< ::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface > > > const &loreVariantList)
MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemComponent > > getComponents(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents > components, bool includeCustom)
MCAPI ::std::vector<::std::string > getCanPlaceOn() const
MCAPI ::Scripting::Result< void, ::Scripting::ArgumentOutOfBoundsError > setLoreStable(::std::optional<::std::vector<::std::string > > const &loreList)
MCAPI ScriptItemStack(::ScriptModuleMinecraft::ScriptItemStack const &)
static MCAPI ::std::optional<::std::vector<::std::string > > tryCreateLoreVector(::std::vector<::std::variant<::std::string, ::ScriptModuleMinecraft::ScriptRawMessageInterface > > const &loreVariantList, ::std::string &errorMessage)
MCAPI void * $ctor(::ScriptModuleMinecraft::ScriptItemStack &&)
MCAPI ::std::vector<::std::string > getLore() const
MCAPI void * $ctor(::ScriptModuleMinecraft::ScriptItemStack const &)
static MCAPI ::std::optional<::Scripting::ArgumentOutOfBoundsError > validateLoreLength(::std::vector<::std::string > const &loreList)
MCAPI bool hasComponent(::std::shared_ptr<::ScriptModuleMinecraft::ScriptItemComponents > components, ::std::string_view id, bool includeCustom)
MCAPI void clearDynamicProperties(::Scripting::ContextConfig const &contextConfig)
MCAPI ::std::optional<::std::variant< double, float, bool, ::std::string, ::Vec3 > > getDynamicProperty(::Scripting::ContextConfig const &contextConfig, ::std::string const &key)
MCAPI ScriptItemStack(::Scripting::WeakLifetimeScope &scope, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > const &itemTypeHandle, int amount, int data)
static MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack > > createOptionalHandle(::Scripting::WeakLifetimeScope scope, ::ItemStackBase const &item)
MCAPI ::Scripting::Result_deprecated< void > setCanPlaceOn(::std::optional<::std::vector<::std::string > > const &blockIdentifiers)
MCAPI void * $ctor(::Scripting::WeakLifetimeScope &scope, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > const &itemTypeHandle, int amount, int data)
static MCAPI ::Scripting::Result_deprecated< ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack > > _createPotion(::Scripting::WeakLifetimeScope &scope, ::ScriptModuleMinecraft::ScriptPotionOptions const &options)
MCAPI ::Scripting::Result_deprecated< void > setCanDestroy(::std::optional<::std::vector<::std::string > > const &blockIdentifiers)
MCAPI ::std::vector<::ScriptModuleMinecraft::ScriptRawMessageInterface > getRawLore() const
MCAPI ::std::vector<::std::string > getCanDestroy() const
MCAPI bool hasTag(::std::string const &tag) const
MCAPI ScriptItemStack(::Scripting::WeakLifetimeScope &scope, ::ItemStackBase const &item, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > const &itemTypeHandle)
MCAPI int getDynamicPropertyTotalByteCount(::Scripting::ContextConfig const &contextConfig)
MCAPI::ScriptModuleMinecraft::ScriptItemStack & operator=(::ScriptModuleMinecraft::ScriptItemStack &&)
MCAPI::std::string getTypeId() const
MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > getType() const
MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemStack > clone(::Scripting::WeakLifetimeScope scope) const
MCAPI ::std::vector<::std::string > getDynamicPropertyIds(::Scripting::ContextConfig const &contextConfig)
MCAPI::ScriptModuleMinecraft::ScriptItemStack & operator=(::ScriptModuleMinecraft::ScriptItemStack const &)
MCAPI ::std::optional<::std::string > getNameTag() const
MCAPI void * $ctor(::Scripting::WeakLifetimeScope &scope, ::ItemStackBase const &item, ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptItemType > const &itemTypeHandle)
MCAPI ::Scripting::Result_deprecated< void > setNameTag(::std::optional<::std::string > nameTag)
Definition StrongTypedObjectHandle.h:8
Definition WeakLifetimeScope.h:12
Definition Vec3.h:10
Definition WeakRef.h:8
Definition ScriptPotionOptions.h:18
Definition ContextConfig.h:7
Definition Version.h:7
Definition Alias.h:14