Botcraft 1.21.4
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 BaseMessage<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 < 477 /* < 1.14 */
22 SERIALIZED_FIELD(FullChunk, bool);
23 SERIALIZED_FIELD(AvailableSections, VarInt);
24#elif PROTOCOL_VERSION < 573 /* < 1.15 */
25 SERIALIZED_FIELD(FullChunk, bool);
26 SERIALIZED_FIELD(AvailableSections, VarInt);
27 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
28#elif PROTOCOL_VERSION < 735 /* < 1.16 */
29 SERIALIZED_FIELD(FullChunk, bool);
30 SERIALIZED_FIELD(AvailableSections, VarInt);
31 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
32 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::array<int, 1024>, &THIS::HasFullChunk>);
33#elif PROTOCOL_VERSION < 751 /* < 1.16.2 */
34 SERIALIZED_FIELD(FullChunk, bool);
35 SERIALIZED_FIELD(IgnoreOldData, bool);
36 SERIALIZED_FIELD(AvailableSections, VarInt);
37 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
38 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::array<int, 1024>, &THIS::HasFullChunk>);
39#elif PROTOCOL_VERSION < 755 /* < 1.17 */
40 SERIALIZED_FIELD(FullChunk, bool);
41 SERIALIZED_FIELD(AvailableSections, VarInt);
42 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
43 SERIALIZED_FIELD(Biomes, Internal::Conditioned<std::vector<VarInt>, &THIS::HasFullChunk>);
44#else
45 SERIALIZED_FIELD(AvailableSections, std::vector<unsigned long long int>);
46 SERIALIZED_FIELD(Heightmaps, NBT::UnnamedValue);
47 SERIALIZED_FIELD(Biomes, std::vector<VarInt>);
48#endif
49 SERIALIZED_FIELD(Buffer, std::vector<unsigned char>);
50 SERIALIZED_FIELD(BlockEntitiesTags, std::vector<NBT::UnnamedValue>);
51
53 };
54} //ProtocolCraft
55#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,...)