Botcraft
26.3
Loading...
Searching...
No Matches
TrackedWaypoint.hpp
Go to the documentation of this file.
1
#if PROTOCOL_VERSION > 770
/* > 1.21.5 */
2
#pragma once
3
4
#include <memory>
5
6
#include "
protocolCraft/NetworkType.hpp
"
7
#include "
protocolCraft/Utilities/DynamicType.hpp
"
8
9
#include "
protocolCraft/Types/Either.hpp
"
10
#include "
protocolCraft/Types/Waypoints/WaypointIcon.hpp
"
11
12
namespace
ProtocolCraft
13
{
14
enum class
TrackedWaypointDataType
15
{
16
None
= -1,
17
Empty
,
18
Vec3i
,
19
Chunk
,
20
Azimuth
,
21
NUM_TRACKED_WAYPOINT_DATA_TYPES
22
};
23
24
class
TrackedWaypointData;
25
26
class
TrackedWaypoint
:
public
NetworkType
27
{
28
private
:
29
static
std::shared_ptr<TrackedWaypointData>
CreateTrackedWaypointData
(
const
TrackedWaypointDataType
type);
30
31
SERIALIZED_FIELD
(
Identifier
,
Either<UUID, std::string>
);
32
SERIALIZED_FIELD
(Icon,
WaypointIcon
);
33
SERIALIZED_DYNAMIC_FIELD
(
TrackedWaypoint
, Type, Data,
TrackedWaypointData
,
TrackedWaypoint::CreateTrackedWaypointData
,
Internal::DiffType<TrackedWaypointDataType, VarInt>
);
34
35
DECLARE_READ_WRITE_SERIALIZE
;
36
};
37
}
38
#endif
DynamicType.hpp
Either.hpp
NetworkType.hpp
WaypointIcon.hpp
ProtocolCraft::Either
Definition
Either.hpp:11
ProtocolCraft::Identifier
Definition
Identifier.hpp:8
ProtocolCraft::NetworkType
Definition
NetworkType.hpp:11
ProtocolCraft::TrackedWaypointData
Definition
TrackedWaypointData.hpp:9
ProtocolCraft::TrackedWaypoint
Definition
TrackedWaypoint.hpp:27
ProtocolCraft::TrackedWaypoint::CreateTrackedWaypointData
static std::shared_ptr< TrackedWaypointData > CreateTrackedWaypointData(const TrackedWaypointDataType type)
Definition
TrackedWaypoint.cpp:22
ProtocolCraft::TrackedWaypoint::SERIALIZED_FIELD
SERIALIZED_FIELD(Identifier, Either< UUID, std::string >)
ProtocolCraft::TrackedWaypoint::DECLARE_READ_WRITE_SERIALIZE
DECLARE_READ_WRITE_SERIALIZE
Definition
TrackedWaypoint.hpp:35
ProtocolCraft::TrackedWaypoint::SERIALIZED_FIELD
SERIALIZED_FIELD(Icon, WaypointIcon)
ProtocolCraft::TrackedWaypoint::SERIALIZED_DYNAMIC_FIELD
SERIALIZED_DYNAMIC_FIELD(TrackedWaypoint, Type, Data, TrackedWaypointData, TrackedWaypoint::CreateTrackedWaypointData, Internal::DiffType< TrackedWaypointDataType, VarInt >)
ProtocolCraft::WaypointIcon
Definition
WaypointIcon.hpp:14
ProtocolCraft
Definition
ItemUtilities.hpp:8
ProtocolCraft::SlotDisplayDataType::Empty
@ Empty
ProtocolCraft::ConnectionState::None
@ None
ProtocolCraft::TrackedWaypointDataType
TrackedWaypointDataType
Definition
TrackedWaypoint.hpp:15
ProtocolCraft::TrackedWaypointDataType::NUM_TRACKED_WAYPOINT_DATA_TYPES
@ NUM_TRACKED_WAYPOINT_DATA_TYPES
ProtocolCraft::TrackedWaypointDataType::Chunk
@ Chunk
ProtocolCraft::TrackedWaypointDataType::Azimuth
@ Azimuth
ProtocolCraft::TrackedWaypointDataType::Vec3i
@ Vec3i
ProtocolCraft::Internal::DiffType
Just a simple type wrapper that will store with T1 and serialize as T2 (can be used for Enum/VarInt f...
Definition
Templates.hpp:72
protocolCraft
include
protocolCraft
Types
Waypoints
TrackedWaypoint.hpp
Generated by
1.9.8