Botcraft 26.3
Loading...
Searching...
No Matches
ClientboundSoundPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#if PROTOCOL_VERSION > 760 /* > 1.19.2 */
8#endif
9
10#if PROTOCOL_VERSION < 107 /* < 1.9 */
11#include <string>
12#endif
13
14namespace ProtocolCraft
15{
16 class ClientboundSoundPacket : public BasePacket<ClientboundSoundPacket>
17 {
18 public:
19 static constexpr std::string_view packet_name = "Sound";
20
21#if PROTOCOL_VERSION < 107 /* < 1.9 */
22 SERIALIZED_FIELD(Sound, std::string);
23#elif PROTOCOL_VERSION < 761 /* < 1.19.3 */
25#else
27#endif
28#if PROTOCOL_VERSION > 47 /* > 1.8.9 */
30#endif
34 SERIALIZED_FIELD(Volume, float);
35#if PROTOCOL_VERSION < 210 /* < 1.10 */
36 SERIALIZED_FIELD(Pitch, unsigned char);
37#else
38 SERIALIZED_FIELD(Pitch, float);
39#endif
40#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
41 SERIALIZED_FIELD(Seed, long long int);
42#endif
43
45 };
46} //ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
static constexpr std::string_view packet_name
SERIALIZED_FIELD(Sound, Holder< SoundEvent >)
SERIALIZED_FIELD(Seed, long long int)