Botcraft 1.21.10
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 ItemSlime,
118#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
120#endif
123 Lava,
124 Mycelium,
125 Note,
126 Poof,
127 Portal,
128 Rain,
129 Smoke,
130#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
132#endif
133#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
134 Sneeze,
135#endif
136 Spit,
137 SquidInk,
141 Splash,
142 Witch,
143 BubblePop,
146 Nautilus,
147 Dolphin,
148#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
151#endif
152#if PROTOCOL_VERSION > 572 /* > 1.14.4 */
157#endif
158#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
160#endif
161#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
162 Ash,
165#endif
166#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
168#endif
169#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
174 WhiteAsh,
175#endif
176#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
178 Snowflake,
184 Glow,
185 WaxOn,
186 WaxOff,
188 Scrape,
189#endif
190#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
191 Shriek,
192#endif
193#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
194 EggCrack,
195#endif
196#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
197 DustPlume,
198#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
199 GustDust,
200#endif
202#endif
203#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
208 RaidOmen,
209 TrialOmen,
210#endif
211#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
213#endif
214#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
215 Firefly,
216#endif
218 };
219#else
220 enum class ParticleType
221 {
222 None = -1,
223 Explode,
224 LargeExplode,
225 HugeExplosion,
226 FireworksSpark,
227 Bubble,
228 Splash,
229 Wake,
230 Suspended,
231 Depthsuspend,
232 Crit,
233 MagicCrit,
234 Smoke,
236 Spell,
237 InstantSpell,
238 MobSpell,
239 MobSpellAmbient,
240 WitchMagic,
241 DripWater,
242 DripLava,
245 Townaura,
246 Note,
247 Portal,
248 EnchantmentTable,
249 Flame,
250 Lava,
251 Footstep,
252 Cloud,
253 Reddust,
254 Snowballpoof,
255 Snowshovel,
256 Slime,
257 Heart,
258 Barrier,
259 Iconcrack,
260 Blockcrack,
261 Blockdust,
262 Droplet,
263 Take,
264 MobAppearance,
266 EndRod,
270 Totem,
271 Spit,
273 };
274#endif
275
276 class ParticleOption;
277
278 class Particle : public NetworkType
279 {
280 public:
281 Particle();
282 virtual ~Particle();
283 std::string_view GetName() const;
284
286 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr<ParticleOption>);
287
289 GETTER(Option);
290
292
294
295#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
296 public:
297 void ReadOption(ReadIterator& iter, size_t& length);
298 void WriteOption(WriteContainer& container) const;
299#endif
300 };
301}
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Option, std::shared_ptr< ParticleOption >)
Particle & SetParticleType(const ProtocolCraft::ParticleType particle_type_)
Definition Particle.cpp:357
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