LeviLamina
Loading...
Searching...
No Matches
ScriptPotions.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
7#include "mc/deps/scripting/runtime/Result.h"
8#include "mc/world/item/alchemy/Potion.h"
9
10// auto generated forward declare list
11// clang-format off
12class HashedString;
13class Potion;
14namespace ScriptModuleMinecraft { class ScriptItemStack; }
15namespace ScriptModuleMinecraft { class ScriptPotionDeliveryType; }
16namespace ScriptModuleMinecraft { class ScriptPotionEffectType; }
17namespace ScriptModuleMinecraft { struct ScriptInvalidPotionDeliveryTypeError; }
18namespace ScriptModuleMinecraft { struct ScriptInvalidPotionEffectTypeError; }
19namespace Scripting { class WeakLifetimeScope; }
20namespace Scripting { struct ClassBinding; }
21namespace Scripting { struct EngineError; }
22// clang-format on
23
24namespace ScriptModuleMinecraft {
25
26class ScriptPotions {
27public:
28 // ScriptPotions inner types define
29 using Key = ::HashedString;
30
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<
35 8,
36 64,
37 ::std::unordered_map<
38 ::Potion::PotionType,
40 mPotionDeliveryTypeHandles;
41 ::ll::TypedStorage<
42 8,
43 64,
44 ::std::unordered_map<
45 ::std::string,
47 mPotionEffectTypeHandles;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 ScriptPotions(ScriptPotions const&);
53 ScriptPotions();
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI ::ScriptModuleMinecraft::ScriptPotions& operator=(::ScriptModuleMinecraft::ScriptPotions const&);
59
60 MCAPI ~ScriptPotions();
61 // NOLINTEND
62
63public:
64 // static functions
65 // NOLINTBEGIN
66 MCAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotions>
67 _getHandle(::Scripting::WeakLifetimeScope& scope);
68
69 MCAPI static ::Scripting::ClassBinding bind();
70
71 MCAPI static ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotionDeliveryType>>
72 getDeliveryTypes(::Scripting::WeakLifetimeScope scope);
73
74 MCAPI static ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotionEffectType>>
75 getEffectTypes(::Scripting::WeakLifetimeScope scope);
76
77 MCAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotionDeliveryType>
78 getOrCreatePotionDeliveryType(::Potion::PotionType potionType, ::Scripting::WeakLifetimeScope scope);
79
80 MCAPI static ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotionEffectType>
81 getOrCreatePotionEffectType(
82 ::gsl::not_null<::std::shared_ptr<::Potion const>> potion,
84 );
85
86 MCAPI static ::std::optional<
88 getPotionDeliveryType(::Scripting::WeakLifetimeScope scope, ::std::string const& potionTypeId);
89
90 MCAPI static ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptPotionEffectType>>
91 getPotionEffectType(::Scripting::WeakLifetimeScope scope, ::std::string const& potionTypeId);
92
93 MCAPI static ::Scripting::Result<
98 resolve(
100 ::std::variant<
101 ::std::string,
103 ::std::variant<
104 ::std::string,
106 );
107 // NOLINTEND
108
109public:
110 // destructor thunk
111 // NOLINTBEGIN
112 MCAPI void $dtor();
113 // NOLINTEND
114};
115
116} // namespace ScriptModuleMinecraft
Definition HashedString.h:5
Definition Potion.h:16
Definition ScriptItemStack.h:32
Definition ScriptPotionDeliveryType.h:15
Definition ScriptPotionEffectType.h:17
Definition ScriptPotions.h:26
Definition StrongTypedObjectHandle.h:8
Definition WeakLifetimeScope.h:14
Definition ScriptInvalidPotionDeliveryTypeError.h:15
Definition ScriptInvalidPotionEffectTypeError.h:15
Definition ClassBinding.h:19
Definition EngineError.h:15