Botcraft
26.2
Loading...
Searching...
No Matches
DataComponentTypeFoodProperties.hpp
Go to the documentation of this file.
1
#if PROTOCOL_VERSION > 765
/* > 1.20.4 */
2
#pragma once
3
#include "
protocolCraft/Types/Components/DataComponentType.hpp
"
4
#if PROTOCOL_VERSION < 768
/* < 1.21.2 */
5
#include "
protocolCraft/Types/Components/Subtypes/PossibleEffect.hpp
"
6
#if PROTOCOL_VERSION > 766
/* > 1.20.6 */
7
#include "
protocolCraft/Types/Item/Slot.hpp
"
8
9
#include <optional>
10
#endif
11
#include <vector>
12
#endif
13
14
15
namespace
ProtocolCraft
16
{
17
namespace
Components
18
{
19
class
DataComponentTypeFoodProperties
:
public
DataComponentType
20
{
21
SERIALIZED_FIELD
(Nutrition,
VarInt
);
22
SERIALIZED_FIELD
(Saturation,
float
);
23
SERIALIZED_FIELD
(CanAlwaysEat,
bool
);
24
#if PROTOCOL_VERSION < 768
/* < 1.21.2 */
25
SERIALIZED_FIELD
(EatSeconds,
float
);
26
#if PROTOCOL_VERSION > 766
/* > 1.20.6 */
27
SERIALIZED_FIELD
(UsingConvertsTo, std::optional<Slot>);
28
#endif
29
SERIALIZED_FIELD
(Effects, std::vector<PossibleEffect>);
30
#endif
31
32
DECLARE_READ_WRITE_SERIALIZE
;
33
};
34
}
35
}
36
#endif
SERIALIZED_FIELD
#define SERIALIZED_FIELD(Name,...)
Definition
AutoSerializedMacros.hpp:77
DataComponentType.hpp
PossibleEffect.hpp
Slot.hpp
ProtocolCraft::Components::DataComponentTypeFoodProperties
Definition
DataComponentTypeFoodProperties.hpp:20
ProtocolCraft::Components::DataComponentTypeFoodProperties::DECLARE_READ_WRITE_SERIALIZE
DECLARE_READ_WRITE_SERIALIZE
Definition
DataComponentTypeFoodProperties.hpp:32
ProtocolCraft::Components::DataComponentTypeFoodProperties::SERIALIZED_FIELD
SERIALIZED_FIELD(Saturation, float)
ProtocolCraft::Components::DataComponentTypeFoodProperties::SERIALIZED_FIELD
SERIALIZED_FIELD(CanAlwaysEat, bool)
ProtocolCraft::Components::DataComponentTypeFoodProperties::SERIALIZED_FIELD
SERIALIZED_FIELD(Nutrition, VarInt)
ProtocolCraft::Components::DataComponentType
Definition
DataComponentType.hpp:10
ProtocolCraft
Definition
ItemUtilities.hpp:8
ProtocolCraft::VarType
Definition
Templates.hpp:26
protocolCraft
include
protocolCraft
Types
Components
DataComponentTypeFoodProperties.hpp
Generated by
1.9.8