Botcraft 1.21.5
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 Crit,
34#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
37#endif
39#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
41#endif
42 Dust,
43#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
45#endif
46 Effect,
49 Enchant,
50 EndRod,
54#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
55 Gust,
56#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
57 GustEmitter,
58#endif
59#endif
60#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
64#endif
65#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
67#endif
70 Fishing,
71 Flame,
72#if PROTOCOL_VERSION > 761 /* > 1.19.3 */ && PROTOCOL_VERSION < 763 /* < 1.20 */
73 DrippingCherryLeaves,
74 FallingCherryLeaves,
75 LandingCherryLeaves,
76#endif
77#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
79#endif
80#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
82#endif
83#if PROTOCOL_VERSION > 768 /* > 1.21.3 */
85#endif
86#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
88#endif
89#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
93#endif
94#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
96 Soul,
97#endif
98#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
99 Flash,
100#endif
102#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
103 Composter,
104#endif
105 Heart,
107 Item,
108#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
109 Vibration,
110#endif
111#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
112 Trail,
113#endif
114 ItemSlime,
115#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
117#endif
120 Lava,
121 Mycelium,
122 Note,
123 Poof,
124 Portal,
125 Rain,
126 Smoke,
127#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
129#endif
130#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
131 Sneeze,
132#endif
133 Spit,
134 SquidInk,
138 Splash,
139 Witch,
140 BubblePop,
143 Nautilus,
144 Dolphin,
145#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
148#endif
149#if PROTOCOL_VERSION > 572 /* > 1.14.4 */
154#endif
155#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
157#endif
158#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
159 Ash,
162#endif
163#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
165#endif
166#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
171 WhiteAsh,
172#endif
173#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
175 Snowflake,
181 Glow,
182 WaxOn,
183 WaxOff,
185 Scrape,
186#endif
187#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
188 Shriek,
189#endif
190#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
191 EggCrack,
192#endif
193#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
194 DustPlume,
195#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
196 GustDust,
197#endif
199#endif
200#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
205 RaidOmen,
206 TrialOmen,
207#endif
208#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
210#endif
211#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
212 Firefly,
213#endif
215 };
216#else
217 enum class ParticleType
218 {
219 None = -1,
220 Explode,
221 LargeExplode,
222 HugeExplosion,
223 FireworksSpark,
224 Bubble,
225 Splash,
226 Wake,
227 Suspended,
228 Depthsuspend,
229 Crit,
230 MagicCrit,
231 Smoke,
233 Spell,
234 InstantSpell,
235 MobSpell,
236 MobSpellAmbient,
237 WitchMagic,
238 DripWater,
239 DripLava,
242 Townaura,
243 Note,
244 Portal,
245 EnchantmentTable,
246 Flame,
247 Lava,
248 Footstep,
249 Cloud,
250 Reddust,
251 Snowballpoof,
252 Snowshovel,
253 Slime,
254 Heart,
255 Barrier,
256 Iconcrack,
257 Blockcrack,
258 Blockdust,
259 Droplet,
260 Take,
261 MobAppearance,
263 EndRod,
267 Totem,
268 Spit,
270 };
271#endif
272
273 class ParticleOptions;
274
275 class Particle : public NetworkType
276 {
277 public:
278 Particle();
279 virtual ~Particle();
280 std::string_view GetName() const;
281
283 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Options, std::shared_ptr<ParticleOptions>);
284
286 GETTER(Options);
287
289
291
292#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
293 public:
294 void ReadOptions(ReadIterator& iter, size_t& length);
295 void WriteOptions(WriteContainer& container) const;
296#endif
297 };
298}
Particle & SetParticleType(const ProtocolCraft::ParticleType particle_type_)
Definition Particle.cpp:338
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Options, std::shared_ptr< ParticleOptions >)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(ParticleType, Internal::DiffType< ProtocolCraft::ParticleType, VarInt >)
std::string_view GetName() const
Definition Particle.cpp:73
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