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