LeviLamina
Loading...
Searching...
No Matches
TeleportCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/Command.h"
7#include "mc/server/commands/CommandPositionFloat.h"
8#include "mc/server/commands/CommandSelector.h"
9#include "mc/server/commands/CommandSelectorResults.h"
10#include "mc/server/commands/RelativeFloat.h"
11#include "mc/util/rotation_command_utils/FacingResult.h"
12
13// auto generated forward declare list
14// clang-format off
15class Actor;
16class CommandArea;
17class CommandOrigin;
18class CommandOutput;
19class CommandRegistry;
20class TeleportTarget;
21class Vec3;
22struct DimensionType;
23namespace RotationCommandUtils { class RotationData; }
24// clang-format on
25
26class TeleportCommand : public ::Command {
27public:
28 // TeleportCommand inner types declare
29 // clang-format off
30 struct mApplyTeleport;
31 // clang-format on
32
33 // TeleportCommand inner types define
34 struct mApplyTeleport {};
35
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<
40 8,
41 64,
42 ::std::function<void(
43 ::Actor&,
44 ::Vec3,
45 ::Vec3*,
47 ::std::optional<::RotationCommandUtils::RotationData> const&,
48 int
49 )>>
51 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargets;
52 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mDestinationEntity;
53 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mDestinationPos;
54 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mFacingEntity;
55 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mFacingPos;
56 ::ll::TypedStorage<4, 8, ::RelativeFloat> mYRot;
57 ::ll::TypedStorage<4, 8, ::RelativeFloat> mXRot;
58 ::ll::TypedStorage<4, 4, ::RotationCommandUtils::FacingResult> mHaveFacing;
59 ::ll::TypedStorage<1, 1, bool> mDestinationIsPosition;
60 ::ll::TypedStorage<1, 1, bool> mIsUsingRotation;
61 ::ll::TypedStorage<1, 1, bool> mFacingIsPosition;
62 ::ll::TypedStorage<1, 1, bool> mCheckForBlocks;
63 // NOLINTEND
64
65public:
66 // virtual functions
67 // NOLINTBEGIN
68 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI TeleportCommand();
75
76 MCAPI void doArmorStandTeleportBackwardCompability(::Actor& target, ::Actor const* destinationEntity) const;
77
78 MCAPI ::RotationCommandUtils::FacingResult getFacingDirection(
79 ::CommandOrigin const& origin,
80 ::CommandOutput& output,
81 ::Vec3& faceTarget,
82 ::Actor* destinationEntity
83 ) const;
84 // NOLINTEND
85
86public:
87 // static functions
88 // NOLINTBEGIN
89 MCAPI static void applyTarget(::Actor& victim, ::TeleportTarget target, bool keepVelocity);
90
91 MCAPI static ::TeleportTarget computeTarget(
92 ::Actor& victim,
93 ::Vec3 destination,
94 ::Vec3* facePosition,
95 ::DimensionType destinationDimension,
96 ::std::optional<::RotationCommandUtils::RotationData> const& rotationData,
97 int commandVersion
98 );
99
100 MCAPI static ::std::unique_ptr<::CommandArea> getCommandAreaForTargets(
101 ::CommandOrigin const& origin,
103 ::Vec3 destination,
104 int commandVersion,
105 bool allowUnloadedChunks
106 );
107
108 MCAPI static void setup(::CommandRegistry& registry);
109 // NOLINTEND
110
111public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCAPI void* $ctor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
121
122
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
128 MCNAPI static void** $vftable();
129 // NOLINTEND
130};
Definition Actor.h:125
Definition CommandArea.h:11
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition CommandSelectorResults.h:6
Definition RotationData.h:13
static MCAPI void ** $vftable()
Definition TeleportTarget.h:14
Definition Vec3.h:10
Definition DimensionType.h:5
Definition TeleportCommand.h:34