Botcraft 26.3
Loading...
Searching...
No Matches
ClientboundLevelChunkPacket.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION < 757 /* < 1.18 */
2#pragma once
3
6
7namespace ProtocolCraft
8{
9
10 class ClientboundLevelChunkPacket : public BasePacket<ClientboundLevelChunkPacket>
11 {
12 public:
13 static constexpr std::string_view packet_name = "Level Chunk";
14
15#if PROTOCOL_VERSION > 551 /* > 1.14.4 */ && PROTOCOL_VERSION < 755 /* < 1.17 */
16 DEFINE_CONDITION(HasFullChunk, GetFullChunk());
17#endif
18
19 SERIALIZED_FIELD(X, int);
20 SERIALIZED_FIELD(Z, int);
21#if PROTOCOL_VERSION < 107 /* < 1.9 */
22 SERIALIZED_FIELD(FullChunk, bool);
23 SERIALIZED_FIELD(AvailableSections, unsigned short);
24#elif PROTOCOL_VERSION < 477 /* < 1.14 */
25 SERIALIZED_FIELD(FullChunk, bool);
26 SERIALIZED_FIELD(AvailableSections, VarInt);
27#elif PROTOCOL_VERSION < 573 /* < 1.15 */
28 SERIALIZED_FIELD(FullChunk, bool);
29 SERIALIZED_FIELD(AvailableSections, VarInt);
30 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
31#elif PROTOCOL_VERSION < 735 /* < 1.16 */
32 SERIALIZED_FIELD(FullChunk, bool);
33 SERIALIZED_FIELD(AvailableSections, VarInt);
34 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
35 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::array<int, 1024>, &THIS::HasFullChunk>);
36#elif PROTOCOL_VERSION < 751 /* < 1.16.2 */
37 SERIALIZED_FIELD(FullChunk, bool);
38 SERIALIZED_FIELD(IgnoreOldData, bool);
39 SERIALIZED_FIELD(AvailableSections, VarInt);
40 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
41 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::array<int, 1024>, &THIS::HasFullChunk>);
42#elif PROTOCOL_VERSION < 755 /* < 1.17 */
43 SERIALIZED_FIELD(FullChunk, bool);
44 SERIALIZED_FIELD(AvailableSections, VarInt);
45 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
46 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::vector<VarInt>, &THIS::HasFullChunk>);
47#else
48 SERIALIZED_FIELD(AvailableSections, std::vector<unsigned long long int>);
49 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
50 SERIALIZED_FIELD(Biomes, std::vector<VarInt>);
51#endif
52 SERIALIZED_FIELD(Buffer, std::vector<unsigned char>);
53#if PROTOCOL_VERSION > 109 /* > 1.9.2 */
54 SERIALIZED_FIELD(BlockEntitiesTags, std::vector<NBT::UnnamedValue>);
55#endif
56
58 };
59} //ProtocolCraft
60#endif
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)