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