Botcraft 26.1.1
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 Cloud,
30#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
32#endif
33 Crit,
37#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
40#endif
42#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
44#endif
45 Dust,
46#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
48#endif
49 Effect,
52 Enchant,
53 EndRod,
57#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
58 Gust,
59#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
60 GustEmitter,
61#endif
62#endif
63#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
67#endif
68#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
70#endif
73 Fishing,
74 Flame,
75#if PROTOCOL_VERSION > 761 /* > 1.19.3 */ && PROTOCOL_VERSION < 763 /* < 1.20 */
76 DrippingCherryLeaves,
77 FallingCherryLeaves,
78 LandingCherryLeaves,
79#endif
80#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
82#endif
83#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
85#endif
86#if PROTOCOL_VERSION > 768 /* > 1.21.3 */
88#endif
89#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
91#endif
92#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
96#endif
97#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
99 Soul,
100#endif
101#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
102 Flash,
103#endif
105#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
106 Composter,
107#endif
108 Heart,
110 Item,
111#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
112 Vibration,
113#endif
114#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
115 Trail,
116#endif
117#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
120#endif
121 ItemSlime,
122#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
124#endif
127 Lava,
128 Mycelium,
129 Note,
130 Poof,
131 Portal,
132 Rain,
133 Smoke,
134#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
136#endif
137#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
138 Sneeze,
139#endif
140 Spit,
141 SquidInk,
145 Splash,
146 Witch,
147 BubblePop,
150 Nautilus,
151 Dolphin,
152#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
155#endif
156#if PROTOCOL_VERSION > 572 /* > 1.14.4 */
161#endif
162#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
164#endif
165#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
166 Ash,
169#endif
170#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
172#endif
173#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
178 WhiteAsh,
179#endif
180#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
182 Snowflake,
188 Glow,
189 WaxOn,
190 WaxOff,
192 Scrape,
193#endif
194#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
195 Shriek,
196#endif
197#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
198 EggCrack,
199#endif
200#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
201 DustPlume,
202#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
203 GustDust,
204#endif
206#endif
207#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
212 RaidOmen,
213 TrialOmen,
214#endif
215#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
217#endif
218#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
219 Firefly,
220#endif
222 };
223#else
224 enum class ParticleType
225 {
226 None = -1,
227 Explode,
228 LargeExplode,
229 HugeExplosion,
230 FireworksSpark,
231 Bubble,
232 Splash,
233 Wake,
234 Suspended,
235 Depthsuspend,
236 Crit,
237 MagicCrit,
238 Smoke,
240 Spell,
241 InstantSpell,
242 MobSpell,
243 MobSpellAmbient,
244 WitchMagic,
245 DripWater,
246 DripLava,
249 Townaura,
250 Note,
251 Portal,
252 EnchantmentTable,
253 Flame,
254 Lava,
255 Footstep,
256 Cloud,
257 Reddust,
258 Snowballpoof,
259 Snowshovel,
260 Slime,
261 Heart,
262 Barrier,
263 Iconcrack,
264 Blockcrack,
265 Blockdust,
266 Droplet,
267 Take,
268 MobAppearance,
270 EndRod,
274 Totem,
275 Spit,
277 };
278#endif
279
280 class ParticleOption;
281
282 class Particle : public NetworkType
283 {
284 public:
285 Particle();
286 virtual ~Particle();
287 std::string_view GetName() const;
288
290 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr<ParticleOption>);
291
293 GETTER(Option);
294
296
298
299#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
300 public:
301 void ReadOption(ReadIterator& iter, size_t& length);
302 void WriteOption(WriteContainer& container) const;
303#endif
304 };
305}
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr< ParticleOption >)
Particle & SetParticleType(const ProtocolCraft::ParticleType particle_type_)
Definition Particle.cpp:361
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(ParticleType, Internal::DiffType< ProtocolCraft::ParticleType, VarInt >)
std::string_view GetName() const
Definition Particle.cpp:89
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