Botcraft 1.21.4
Loading...
Searching...
No Matches
ClientboundOpenScreenPacket.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace ProtocolCraft
7{
8 class ClientboundOpenScreenPacket : public BaseMessage<ClientboundOpenScreenPacket>
9 {
10 public:
11 static constexpr std::string_view packet_name = "Open Screen";
12
13#if PROTOCOL_VERSION < 477 /* < 1.14 */
14 DEFINE_CONDITION(IsHorse, GetType() == "EntityHorse");
15 SERIALIZED_FIELD(ContainerId, unsigned char);
16 SERIALIZED_FIELD(Type, std::string);
17 SERIALIZED_FIELD(Title, Chat);
18 SERIALIZED_FIELD(NumberOfSlots, unsigned char);
20#else
21 SERIALIZED_FIELD(ContainerId, VarInt);
24#endif
25
27 };
28} //ProtocolCraft
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define SERIALIZED_FIELD(Name,...)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83