Botcraft
1.21.4
Loading...
Searching...
No Matches
ClientboundCooldownPacket.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
protocolCraft/BaseMessage.hpp
"
4
#if PROTOCOL_VERSION > 767
/* > 1.21.1 */
5
#include "
protocolCraft/Types/Identifier.hpp
"
6
#endif
7
8
namespace
ProtocolCraft
9
{
10
class
ClientboundCooldownPacket
:
public
BaseMessage
<ClientboundCooldownPacket>
11
{
12
public
:
13
static
constexpr
std::string_view
packet_name
=
"Cooldown"
;
14
15
#if PROTOCOL_VERSION < 768
/* < 1.21.2 */
16
SERIALIZED_FIELD
(
Item
,
VarInt
);
17
#else
18
SERIALIZED_FIELD
(CooldownGroup,
Identifier
);
19
#endif
20
SERIALIZED_FIELD
(Duration,
VarInt
);
21
22
DECLARE_READ_WRITE_SERIALIZE
;
23
};
24
}
//ProtocolCraft
SERIALIZED_FIELD
#define SERIALIZED_FIELD(Name,...)
Definition
AutoSerializedMacros.hpp:77
BaseMessage.hpp
Identifier.hpp
ProtocolCraft::BaseMessage
Definition
BaseMessage.hpp:11
ProtocolCraft::ClientboundCooldownPacket
Definition
ClientboundCooldownPacket.hpp:11
ProtocolCraft::ClientboundCooldownPacket::DECLARE_READ_WRITE_SERIALIZE
DECLARE_READ_WRITE_SERIALIZE
Definition
ClientboundCooldownPacket.hpp:22
ProtocolCraft::ClientboundCooldownPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(CooldownGroup, Identifier)
ProtocolCraft::ClientboundCooldownPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(Duration, VarInt)
ProtocolCraft::ClientboundCooldownPacket::packet_name
static constexpr std::string_view packet_name
Definition
ClientboundCooldownPacket.hpp:13
ProtocolCraft::Identifier
Definition
Identifier.hpp:8
ProtocolCraft
Definition
ItemUtilities.hpp:8
ProtocolCraft::ParticleType::Item
@ Item
ProtocolCraft::VarType
Definition
Templates.hpp:26
protocolCraft
include
protocolCraft
Messages
Play
Clientbound
ClientboundCooldownPacket.hpp
Generated by
1.9.8