LeviLamina
Loading...
Searching...
No Matches
Potion.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/effect/MobEffectInstance.h"
7
8// auto generated forward declare list
9// clang-format off
10class BaseGameVersion;
11class Experiments;
12class Player;
13namespace Bedrock::Safety { class RedactableString; }
14// clang-format on
15
16class Potion {
17public:
18 // Potion inner types define
19 enum class PotionType : int {
20 Undefined = -1,
21 Regular = 0,
22 Splash = 1,
23 Lingering = 2,
24 };
25
26 enum class PotionVariant : int {
27 Moveslow = 0,
28 Movespeed = 1,
29 Digslow = 2,
30 Digspeed = 3,
31 Damageboost = 4,
32 Heal = 5,
33 Harm = 6,
34 Jump = 7,
35 Confusion = 8,
36 Regen = 9,
37 Resistance = 10,
38 Fireresistance = 11,
39 Waterbreath = 12,
40 Invisibility = 13,
41 Blindness = 14,
42 Nightvision = 15,
43 Hunger = 16,
44 Weakness = 17,
45 Poison = 18,
46 Wither = 19,
47 Healthboost = 20,
48 Absorption = 21,
49 Saturation = 22,
50 Levitation = 23,
51 Turtlemaster = 24,
52 Slowfall = 25,
53 Windcharged = 26,
54 Weaving = 27,
55 Oozing = 28,
56 Infested = 29,
57 Base = 30,
58 };
59
60public:
61 // member variables
62 // NOLINTBEGIN
63 ::ll::TypedStorage<4, 4, int> mId;
64 ::ll::TypedStorage<8, 32, ::std::string> mNameId;
65 ::ll::TypedStorage<8, 32, ::std::string> mPrefix;
66 ::ll::TypedStorage<8, 24, ::std::vector<::MobEffectInstance>> mEffects;
67 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDescriptionIds;
68 ::ll::TypedStorage<4, 4, ::Potion::PotionVariant> mVar;
69 // NOLINTEND
70
71public:
72 // prevent constructor by default
73 Potion& operator=(Potion const&);
74 Potion();
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCAPI Potion(::Potion const&);
80
81 MCAPI explicit Potion(::std::string_view nameId);
82
83 MCAPI Potion(::std::string_view nameId, ::std::string_view prefix);
84
85 MCAPI Potion(
86 ::std::string_view nameId,
87 ::std::string_view descriptionID,
88 ::MobEffectInstance const& mobEffect,
89 ::Potion::PotionVariant var
90 );
91
92 MCAPI Potion(
93 ::std::string_view nameId,
94 ::std::vector<::std::string> descriptionIDs,
95 ::std::vector<::MobEffectInstance> mobEffects,
96 ::Potion::PotionVariant var
97 );
98
99 MCAPI ::std::string _getDescriptionIdCombiningStrings(::Potion::PotionType potiontype) const;
100
101 MCAPI ::std::string _getDescriptionIdSingleString(::Potion::PotionType potionType) const;
102
103 MCAPI void appendFormattedPotionText(
105 ::Potion::PotionType potionType,
106 ::Potion::PotionVariant potionVariant,
107 ::Player const& player,
108 float timeMod
109 ) const;
110
111 MCAPI ::std::string getDescriptionId() const;
112
113 MCAPI ::std::string getDescriptionId(::Potion::PotionType potionType) const;
114
115 MCFOLD ::MobEffectInstance const& getMobEffect() const;
116
117 MCAPI int getMobEffectId() const;
118
119 MCFOLD ::std::vector<::MobEffectInstance> const& getMobEffects() const;
120
121 MCFOLD ::std::string getNameId() const;
122
123 MCAPI ::std::string getPotencyDescription(::Potion::PotionType potionType, float timeMod) const;
124
125 MCFOLD int getPotionId() const;
126
127 MCFOLD ::Potion::PotionVariant getPotionVariant() const;
128
129 MCFOLD ::std::string getPrefix() const;
130
131 MCAPI ~Potion();
132 // NOLINTEND
133
134public:
135 // static functions
136 // NOLINTBEGIN
137 MCAPI static void addPotion(::std::shared_ptr<::Potion const> potion);
138
139 MCAPI static void appendMobEffectText(
141 ::Potion::PotionVariant potionVariant,
142 uint mobEffectId,
143 int amplifier,
144 ::Player const& player
145 );
146
147 MCAPI static ::std::string
148 effectDurationToString(::Potion::PotionType potionType, float timeMod, ::MobEffectInstance const& effect);
149
150 MCAPI static ::std::string effectPotencyToString(::MobEffectInstance const& effect);
151
152 MCAPI static ::std::string getBasePotion(::Potion::PotionType type);
153
154 MCAPI static ::std::string getPotencyDescription(
155 ::Potion::PotionType potionType,
156 float timeMod,
157 ::std::string_view descID,
158 ::MobEffectInstance const& effect
159 );
160
161 MCAPI static ::std::shared_ptr<::Potion const> getPotion(int potionId);
162
163 MCAPI static ::std::shared_ptr<::Potion const> getPotion(::std::string_view potionNameId);
164
165 MCAPI static int getPotionCount();
166
167 MCAPI static ::std::vector<::std::shared_ptr<::Potion const>> getPotions();
168
169 MCAPI static void initPotions(::BaseGameVersion const& baseGameVersion, ::Experiments const& experiments);
170
171 MCAPI static void shutdownPotions();
172 // NOLINTEND
173
174public:
175 // static variables
176 // NOLINTBEGIN
177 MCAPI static ::std::shared_ptr<::Potion const> const& Awkward();
178
179 MCAPI static ::std::shared_ptr<::Potion const> const& FireResistance();
180
181 MCAPI static ::std::shared_ptr<::Potion const> const& Harming();
182
183 MCAPI static ::std::shared_ptr<::Potion const> const& Healing();
184
185 MCAPI static ::std::shared_ptr<::Potion const> const& Infested();
186
187 MCAPI static ::std::shared_ptr<::Potion const> const& Invisibility();
188
189 MCAPI static ::std::shared_ptr<::Potion const> const& Leaping();
190
191 MCAPI static ::std::shared_ptr<::Potion const> const& LongFireResistance();
192
193 MCAPI static ::std::shared_ptr<::Potion const> const& LongInvisibility();
194
195 MCAPI static ::std::shared_ptr<::Potion const> const& LongLeaping();
196
197 MCAPI static ::std::shared_ptr<::Potion const> const& LongMundane();
198
199 MCAPI static ::std::shared_ptr<::Potion const> const& LongNightvision();
200
201 MCAPI static ::std::shared_ptr<::Potion const> const& LongPoison();
202
203 MCAPI static ::std::shared_ptr<::Potion const> const& LongRegeneration();
204
205 MCAPI static ::std::shared_ptr<::Potion const> const& LongSlowFalling();
206
207 MCAPI static ::std::shared_ptr<::Potion const> const& LongSlowness();
208
209 MCAPI static ::std::shared_ptr<::Potion const> const& LongStrength();
210
211 MCAPI static ::std::shared_ptr<::Potion const> const& LongSwiftness();
212
213 MCAPI static ::std::shared_ptr<::Potion const> const& LongTurtleMaster();
214
215 MCAPI static ::std::shared_ptr<::Potion const> const& LongWaterBreathing();
216
217 MCAPI static ::std::shared_ptr<::Potion const> const& LongWeakness();
218
219 MCAPI static ::std::shared_ptr<::Potion const> const& Mundane();
220
221 MCAPI static ::std::shared_ptr<::Potion const> const& Nightvision();
222
223 MCAPI static ::std::shared_ptr<::Potion const> const& Oozing();
224
225 MCAPI static ::std::shared_ptr<::Potion const> const& Poison();
226
227 MCAPI static ::std::shared_ptr<::Potion const> const& Regeneration();
228
229 MCAPI static ::std::shared_ptr<::Potion const> const& SlowFalling();
230
231 MCAPI static ::std::shared_ptr<::Potion const> const& Slowness();
232
233 MCAPI static ::std::shared_ptr<::Potion const> const& Strength();
234
235 MCAPI static ::std::shared_ptr<::Potion const> const& StrongHarming();
236
237 MCAPI static ::std::shared_ptr<::Potion const> const& StrongHealing();
238
239 MCAPI static ::std::shared_ptr<::Potion const> const& StrongLeaping();
240
241 MCAPI static ::std::shared_ptr<::Potion const> const& StrongPoison();
242
243 MCAPI static ::std::shared_ptr<::Potion const> const& StrongRegeneration();
244
245 MCAPI static ::std::shared_ptr<::Potion const> const& StrongSlowness();
246
247 MCAPI static ::std::shared_ptr<::Potion const> const& StrongStrength();
248
249 MCAPI static ::std::shared_ptr<::Potion const> const& StrongSwiftness();
250
251 MCAPI static ::std::shared_ptr<::Potion const> const& StrongTurtleMaster();
252
253 MCAPI static ::std::shared_ptr<::Potion const> const& Swiftness();
254
255 MCAPI static ::std::shared_ptr<::Potion const> const& Thick();
256
257 MCAPI static ::std::shared_ptr<::Potion const> const& TurtleMaster();
258
259 MCAPI static ::std::shared_ptr<::Potion const> const& Water();
260
261 MCAPI static ::std::shared_ptr<::Potion const> const& WaterBreathing();
262
263 MCAPI static ::std::shared_ptr<::Potion const> const& Weakness();
264
265 MCAPI static ::std::shared_ptr<::Potion const> const& Weaving();
266
267 MCAPI static ::std::shared_ptr<::Potion const> const& WindCharged();
268
269 MCAPI static ::std::shared_ptr<::Potion const> const& Wither();
270
271 MCAPI static int& mLastId();
272
273 MCAPI static ::std::add_lvalue_reference_t<::std::shared_ptr<::Potion const>[]> mPotionsById();
274
275 MCAPI static ::std::unordered_map<::std::string, int>& mPotionsByName();
276 // NOLINTEND
277
278public:
279 // constructor thunks
280 // NOLINTBEGIN
281 MCAPI void* $ctor(::Potion const&);
282
283 MCAPI void* $ctor(::std::string_view nameId);
284
285 MCAPI void* $ctor(::std::string_view nameId, ::std::string_view prefix);
286
287 MCAPI void* $ctor(
288 ::std::string_view nameId,
289 ::std::string_view descriptionID,
290 ::MobEffectInstance const& mobEffect,
291 ::Potion::PotionVariant var
292 );
293
294 MCAPI void* $ctor(
295 ::std::string_view nameId,
296 ::std::vector<::std::string> descriptionIDs,
297 ::std::vector<::MobEffectInstance> mobEffects,
298 ::Potion::PotionVariant var
299 );
300 // NOLINTEND
301
302public:
303 // destructor thunk
304 // NOLINTBEGIN
305 MCAPI void $dtor();
306 // NOLINTEND
307};
Definition BaseGameVersion.h:13
Definition RedactableString.h:10
Definition Experiments.h:14
Definition MobEffectInstance.h:20
Definition Player.h:137