Botcraft 1.21.4
Loading...
Searching...
No Matches
ClientboundSetPlayerTeamPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4#if PROTOCOL_VERSION > 374 /* > 1.12.2 */
6#endif
7
8namespace ProtocolCraft
9{
10 class ClientboundSetPlayerTeamPacket : public BaseMessage<ClientboundSetPlayerTeamPacket>
11 {
12 public:
13 static constexpr std::string_view packet_name = "Set Player Team";
14
15 DEFINE_CONDITION(Method02, GetMethod() == 0 || GetMethod() == 2);
16 DEFINE_CONDITION(Method034, GetMethod() == 0 || GetMethod() == 3 || GetMethod() == 4);
17
18 SERIALIZED_FIELD(Name_, std::string);
19 SERIALIZED_FIELD(Method, char);
20#if PROTOCOL_VERSION < 393 /* < 1.13 */
28#else
36#endif
37 SERIALIZED_FIELD(Players, Internal::Conditioned<std::vector<std::string>, &THIS::Method034>);
38
40 };
41} //ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(Players, Internal::Conditioned< std::vector< std::string >, &THIS::Method034 >)
SERIALIZED_FIELD(NametagVisibility, Internal::Conditioned< std::string, &THIS::Method02 >)
SERIALIZED_FIELD(DisplayName, Internal::Conditioned< Chat, &THIS::Method02 >)
SERIALIZED_FIELD(Color, Internal::Conditioned< VarInt, &THIS::Method02 >)
DEFINE_CONDITION(Method02, GetMethod()==0||GetMethod()==2)
SERIALIZED_FIELD(PlayerPrefix, Internal::Conditioned< Chat, &THIS::Method02 >)
DEFINE_CONDITION(Method034, GetMethod()==0||GetMethod()==3||GetMethod()==4)
SERIALIZED_FIELD(CollisionRule, Internal::Conditioned< std::string, &THIS::Method02 >)
SERIALIZED_FIELD(Options, Internal::Conditioned< char, &THIS::Method02 >)
SERIALIZED_FIELD(PlayerSuffix, Internal::Conditioned< Chat, &THIS::Method02 >)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83