Botcraft 1.21.4
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 > 758 /* > 1.18.2 */
90#endif
91#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
93 Soul,
94#endif
95#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
96 Flash,
97#endif
99#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
100 Composter,
101#endif
102 Heart,
104 Item,
105#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
106 Vibration,
107#endif
108#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
109 Trail,
110#endif
111 ItemSlime,
112#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
114#endif
117 Lava,
118 Mycelium,
119 Note,
120 Poof,
121 Portal,
122 Rain,
123 Smoke,
124#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
126#endif
127#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
128 Sneeze,
129#endif
130 Spit,
131 SquidInk,
135 Splash,
136 Witch,
137 BubblePop,
140 Nautilus,
141 Dolphin,
142#if PROTOCOL_VERSION > 476 /* > 1.13.2 */
145#endif
146#if PROTOCOL_VERSION > 572 /* > 1.14.4 */
151#endif
152#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
154#endif
155#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
156 Ash,
159#endif
160#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
162#endif
163#if PROTOCOL_VERSION > 734 /* > 1.15.2 */
168 WhiteAsh,
169#endif
170#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
172 Snowflake,
178 Glow,
179 WaxOn,
180 WaxOff,
182 Scrape,
183#endif
184#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
185 Shriek,
186#endif
187#if PROTOCOL_VERSION > 762 /* > 1.19.4 */
188 EggCrack,
189#endif
190#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
191 DustPlume,
192#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
193 GustDust,
194#endif
196#endif
197#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
202 RaidOmen,
203 TrialOmen,
204#endif
205#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
207#endif
209 };
210#else
211 enum class ParticleType
212 {
213 None = -1,
214 Explode,
215 LargeExplode,
216 HugeExplosion,
217 FireworksSpark,
218 Bubble,
219 Splash,
220 Wake,
221 Suspended,
222 Depthsuspend,
223 Crit,
224 MagicCrit,
225 Smoke,
227 Spell,
228 InstantSpell,
229 MobSpell,
230 MobSpellAmbient,
231 WitchMagic,
232 DripWater,
233 DripLava,
236 Townaura,
237 Note,
238 Portal,
239 EnchantmentTable,
240 Flame,
241 Lava,
242 Footstep,
243 Cloud,
244 Reddust,
245 Snowballpoof,
246 Snowshovel,
247 Slime,
248 Heart,
249 Barrier,
250 Iconcrack,
251 Blockcrack,
252 Blockdust,
253 Droplet,
254 Take,
255 MobAppearance,
257 EndRod,
261 Totem,
262 Spit,
264 };
265#endif
266
267 class ParticleOptions;
268
269 class Particle : public NetworkType
270 {
271 public:
272 Particle();
273 virtual ~Particle();
274 std::string_view GetName() const;
275
277 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Options, std::shared_ptr<ParticleOptions>);
278
280 GETTER(Options);
281
283
285
286#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
287 public:
288 void ReadOptions(ReadIterator& iter, size_t& length);
289 void WriteOptions(WriteContainer& container) const;
290#endif
291 };
292}
Particle & SetParticleType(const ProtocolCraft::ParticleType particle_type_)
Definition Particle.cpp:332
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