Botcraft 26.3
Loading...
Searching...
No Matches
Particle.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string_view>
5
7
8namespace ProtocolCraft
9{
10#if PROTOCOL_VERSION > 392 /* > 1.12.2 */
11 enum class ParticleType
12 {
13 None = -1,
14#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
15 AmbientEntityEffect,
16#endif
18#if PROTOCOL_VERSION < 757 /* < 1.18 */
19 Barrier,
20#endif
21#if PROTOCOL_VERSION > 754 /* > 1.16.5 */ && PROTOCOL_VERSION < 757 /* < 1.18 */
22 Light,
23#endif
24 Block,
25#if PROTOCOL_VERSION > 756 /* > 1.17.1 */
27#endif
28 Bubble,
29#if PROTOCOL_VERSION > 775 /* > 26.1.2 */
33 Geyser,
37#endif
38 Cloud,
39#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
41#endif
42 Crit,
46#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
49#endif
51#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
53#endif
54 Dust,
55#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
57#endif
58 Effect,
61 Enchant,
62 EndRod,
66#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
67 Gust,
68#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
69 GustEmitter,
70#endif
71#endif
72#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
76#endif
77#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
79#endif
82 Fishing,
83 Flame,
84#if PROTOCOL_VERSION > 761 /* > 1.19.3 */ && PROTOCOL_VERSION < 763 /* < 1.20 */
85 DrippingCherryLeaves,
86 FallingCherryLeaves,
87 LandingCherryLeaves,
88#endif
89#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
91#endif
92#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
94#endif
95#if PROTOCOL_VERSION > 768 /* > 1.21.3 */
97#endif
98#if PROTOCOL_VERSION > 776 /* > 26.2 */
102#endif
103#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
105#endif
106#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
107 SculkSoul,
110#endif
111#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
113 Soul,
114#endif
115#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
116 Flash,
117#endif
119#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
120 Composter,
121#endif
122 Heart,
124 Item,
125#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
126 Vibration,
127#endif
128#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
129 Trail,
130#endif
131#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
134#endif
135 ItemSlime,
136#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
138#endif
141 Lava,
142 Mycelium,
143 Note,
144 Poof,
145 Portal,
146 Rain,
147 Smoke,
148#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
150#endif
151#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
152 Sneeze,
153#endif
154 Spit,
155 SquidInk,
159 Splash,
160 Witch,
161 BubblePop,
164 Nautilus,
165 Dolphin,
166#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
169#endif
170#if PROTOCOL_VERSION > 572 /* > 1.14.4 */
175#endif
176#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
178#endif
179#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
180 Ash,
183#endif
184#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
186#endif
187#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
192 WhiteAsh,
193#endif
194#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
196 Snowflake,
202 Glow,
203 WaxOn,
204 WaxOff,
206 Scrape,
207#endif
208#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
209 Shriek,
210#endif
211#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
212 EggCrack,
213#endif
214#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
215 DustPlume,
216#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
217 GustDust,
218#endif
220#endif
221#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
226 RaidOmen,
227 TrialOmen,
228#endif
229#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
231#endif
232#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
233 Firefly,
234#endif
235#if PROTOCOL_VERSION > 775 /* > 26.1.2 */
237#endif
239 };
240#else
241 enum class ParticleType
242 {
243 None = -1,
244 Explode,
245 LargeExplode,
246 HugeExplosion,
247 FireworksSpark,
248 Bubble,
249 Splash,
250 Wake,
251 Suspended,
252 Depthsuspend,
253 Crit,
254 MagicCrit,
255 Smoke,
257 Spell,
258 InstantSpell,
259 MobSpell,
260 MobSpellAmbient,
261 WitchMagic,
262 DripWater,
263 DripLava,
266 Townaura,
267 Note,
268 Portal,
269 EnchantmentTable,
270 Flame,
271 Lava,
272 Footstep,
273 Cloud,
274 Reddust,
275 Snowballpoof,
276 Snowshovel,
277 Slime,
278 Heart,
279 Barrier,
280 Iconcrack,
281 Blockcrack,
282 Blockdust,
283 Droplet,
284 Take,
285 MobAppearance,
287 EndRod,
291 Totem,
292 Spit,
294 };
295#endif
296
297 class ParticleOption;
298
299 class Particle : public NetworkType
300 {
301 public:
302 Particle();
303 virtual ~Particle();
304 std::string_view GetName() const;
305
307 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr<ParticleOption>);
308
310 GETTER(Option);
311
313
315
316#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
317 public:
318 void ReadOption(ReadIterator& iter, size_t& length);
319 void WriteOption(WriteContainer& container) const;
320#endif
321 };
322}
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr< ParticleOption >)
Particle & SetParticleType(const ProtocolCraft::ParticleType particle_type_)
Definition Particle.cpp:386
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(ParticleType, Internal::DiffType< ProtocolCraft::ParticleType, VarInt >)
std::string_view GetName() const
Definition Particle.cpp:97
std::vector< unsigned char > WriteContainer
std::vector< unsigned char >::const_iterator ReadIterator
Just a simple type wrapper that will store with T1 and serialize as T2 (can be used for Enum/VarInt f...
Definition Templates.hpp:72