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 // prevent constructor by default
71 Potion();
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI explicit Potion(::std::string_view nameId);
77
78 MCAPI Potion(
79 ::std::string_view nameId,
80 ::std::string_view descriptionID,
81 ::MobEffectInstance const& mobEffect,
82 ::Potion::PotionVariant var
83 );
84
85 MCAPI Potion(
86 ::std::string_view nameId,
87 ::std::vector<::std::string> descriptionIDs,
88 ::std::vector<::MobEffectInstance> mobEffects,
89 ::Potion::PotionVariant var
90 );
91
92 MCAPI ::std::string _getDescriptionIdCombiningStrings(::Potion::PotionType potiontype) const;
93
94 MCAPI ::std::string _getDescriptionIdSingleString(::Potion::PotionType potionType) const;
95
96 MCAPI void appendFormattedPotionText(
98 ::Potion::PotionType potionType,
99 ::Potion::PotionVariant potionVariant,
100 ::Player const& player,
101 float timeMod
102 ) const;
103
104 MCAPI ::std::string getDescriptionId(::Potion::PotionType potionType) const;
105
106 MCAPI ::std::string getPotencyDescription(::Potion::PotionType potionType, float timeMod) const;
107
108 MCAPI ~Potion();
109 // NOLINTEND
110
111public:
112 // static functions
113 // NOLINTBEGIN
114 MCAPI static void addPotion(::std::shared_ptr<::Potion const> potion);
115
116 MCAPI static void appendMobEffectText(
118 ::Potion::PotionVariant potionVariant,
119 uint mobEffectId,
120 int amplifier,
121 ::Player const& player
122 );
123
124 MCAPI static ::std::string
125 effectDurationToString(::Potion::PotionType potionType, float timeMod, ::MobEffectInstance const& effect);
126
127 MCAPI static ::std::string effectPotencyToString(::MobEffectInstance const& effect);
128
129 MCAPI static ::std::string getBasePotion(::Potion::PotionType type);
130
131 MCAPI static ::std::string getPotencyDescription(
132 ::Potion::PotionType potionType,
133 float timeMod,
134 ::std::string_view descID,
135 ::MobEffectInstance const& effect
136 );
137
138 MCAPI static ::std::shared_ptr<::Potion const> getPotion(::std::string_view potionNameId);
139
140 MCAPI static ::std::vector<::std::shared_ptr<::Potion const>> getPotions();
141
142 MCAPI static void initPotions(::BaseGameVersion const& baseGameVersion, ::Experiments const& experiments);
143 // NOLINTEND
144
145public:
146 // static variables
147 // NOLINTBEGIN
148 MCAPI static ::std::shared_ptr<::Potion const> const& Awkward();
149
150 MCAPI static ::std::shared_ptr<::Potion const> const& FireResistance();
151
152 MCAPI static ::std::shared_ptr<::Potion const> const& Harming();
153
154 MCAPI static ::std::shared_ptr<::Potion const> const& Healing();
155
156 MCAPI static ::std::shared_ptr<::Potion const> const& Infested();
157
158 MCAPI static ::std::shared_ptr<::Potion const> const& Invisibility();
159
160 MCAPI static ::std::shared_ptr<::Potion const> const& Leaping();
161
162 MCAPI static ::std::shared_ptr<::Potion const> const& LongFireResistance();
163
164 MCAPI static ::std::shared_ptr<::Potion const> const& LongInvisibility();
165
166 MCAPI static ::std::shared_ptr<::Potion const> const& LongLeaping();
167
168 MCAPI static ::std::shared_ptr<::Potion const> const& LongMundane();
169
170 MCAPI static ::std::shared_ptr<::Potion const> const& LongNightvision();
171
172 MCAPI static ::std::shared_ptr<::Potion const> const& LongPoison();
173
174 MCAPI static ::std::shared_ptr<::Potion const> const& LongRegeneration();
175
176 MCAPI static ::std::shared_ptr<::Potion const> const& LongSlowFalling();
177
178 MCAPI static ::std::shared_ptr<::Potion const> const& LongSlowness();
179
180 MCAPI static ::std::shared_ptr<::Potion const> const& LongStrength();
181
182 MCAPI static ::std::shared_ptr<::Potion const> const& LongSwiftness();
183
184 MCAPI static ::std::shared_ptr<::Potion const> const& LongTurtleMaster();
185
186 MCAPI static ::std::shared_ptr<::Potion const> const& LongWaterBreathing();
187
188 MCAPI static ::std::shared_ptr<::Potion const> const& LongWeakness();
189
190 MCAPI static ::std::shared_ptr<::Potion const> const& Mundane();
191
192 MCAPI static ::std::shared_ptr<::Potion const> const& Nightvision();
193
194 MCAPI static ::std::shared_ptr<::Potion const> const& Oozing();
195
196 MCAPI static ::std::shared_ptr<::Potion const> const& Poison();
197
198 MCAPI static ::std::shared_ptr<::Potion const> const& Regeneration();
199
200 MCAPI static ::std::shared_ptr<::Potion const> const& SlowFalling();
201
202 MCAPI static ::std::shared_ptr<::Potion const> const& Slowness();
203
204 MCAPI static ::std::shared_ptr<::Potion const> const& Strength();
205
206 MCAPI static ::std::shared_ptr<::Potion const> const& StrongHarming();
207
208 MCAPI static ::std::shared_ptr<::Potion const> const& StrongHealing();
209
210 MCAPI static ::std::shared_ptr<::Potion const> const& StrongLeaping();
211
212 MCAPI static ::std::shared_ptr<::Potion const> const& StrongPoison();
213
214 MCAPI static ::std::shared_ptr<::Potion const> const& StrongRegeneration();
215
216 MCAPI static ::std::shared_ptr<::Potion const> const& StrongSlowness();
217
218 MCAPI static ::std::shared_ptr<::Potion const> const& StrongStrength();
219
220 MCAPI static ::std::shared_ptr<::Potion const> const& StrongSwiftness();
221
222 MCAPI static ::std::shared_ptr<::Potion const> const& StrongTurtleMaster();
223
224 MCAPI static ::std::shared_ptr<::Potion const> const& Swiftness();
225
226 MCAPI static ::std::shared_ptr<::Potion const> const& Thick();
227
228 MCAPI static ::std::shared_ptr<::Potion const> const& TurtleMaster();
229
230 MCAPI static ::std::shared_ptr<::Potion const> const& Water();
231
232 MCAPI static ::std::shared_ptr<::Potion const> const& WaterBreathing();
233
234 MCAPI static ::std::shared_ptr<::Potion const> const& Weakness();
235
236 MCAPI static ::std::shared_ptr<::Potion const> const& Weaving();
237
238 MCAPI static ::std::shared_ptr<::Potion const> const& WindCharged();
239
240 MCAPI static ::std::shared_ptr<::Potion const> const& Wither();
241
242 MCAPI static int& mLastId();
243
244 MCAPI static ::std::add_lvalue_reference_t<::std::shared_ptr<::Potion const>[]> mPotionsById();
245
246 MCAPI static ::std::unordered_map<::std::string, int>& mPotionsByName();
247 // NOLINTEND
248
249public:
250 // constructor thunks
251 // NOLINTBEGIN
252 MCAPI void* $ctor(::std::string_view nameId);
253
254 MCAPI void* $ctor(
255 ::std::string_view nameId,
256 ::std::string_view descriptionID,
257 ::MobEffectInstance const& mobEffect,
258 ::Potion::PotionVariant var
259 );
260
261 MCAPI void* $ctor(
262 ::std::string_view nameId,
263 ::std::vector<::std::string> descriptionIDs,
264 ::std::vector<::MobEffectInstance> mobEffects,
265 ::Potion::PotionVariant var
266 );
267 // NOLINTEND
268
269public:
270 // destructor thunk
271 // NOLINTBEGIN
272 MCAPI void $dtor();
273 // NOLINTEND
274};
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition Experiments.h:14
Definition MobEffectInstance.h:15
Definition Player.h:123
Definition Potion.h:14