Botcraft 26.3
Loading...
Searching...
No Matches
TrackedWaypoint.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
3
5
10
12
13namespace ProtocolCraft
14{
19
21
22 std::shared_ptr<TrackedWaypointData> TrackedWaypoint::CreateTrackedWaypointData(const TrackedWaypointDataType type)
23 {
24 switch (type)
25 {
27 return std::make_shared<EmptyWaypoint>();
29 return std::make_shared<Vec3iWaypoint>();
31 return std::make_shared<ChunkWaypoint>();
33 return std::make_shared<AzimuthWaypoint>();
34 default: // Should not happen
35 throw std::runtime_error("Unable to create TrackedWaypointData with id: " + std::to_string(static_cast<int>(type)) + ".");
36 return nullptr;
37 }
38 }
39
41}
42#endif
#define DEFINE_NETWORK_TYPE(ClassName)
static std::shared_ptr< TrackedWaypointData > CreateTrackedWaypointData(const TrackedWaypointDataType type)