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/CommandPositionFloat.h"
9#include "mc/server/commands/CommandSelector.h"
10#include "mc/server/commands/CommandSelectorResults.h"
11#include "mc/server/commands/RelativeFloat.h"
12#include "mc/util/rotation_command_utils/FacingResult.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class CommandArea;
18class CommandOrigin;
19class CommandOutput;
20class CommandRegistry;
21class Dimension;
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 ::RotationCommandUtils::FacingResult getFacingDirection(
73 ::CommandOrigin const& origin,
74 ::CommandOutput& output,
75 ::Vec3& faceTarget,
76 ::Actor* destinationEntity
77 ) const;
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static void applyTarget(::Actor& victim, ::TeleportTarget target, bool keepVelocity);
84
85 MCAPI static ::TeleportTarget computeTarget(
86 ::Actor& victim,
87 ::Vec3 destination,
88 ::Vec3* facePosition,
89 ::DimensionType destinationDimension,
90 ::std::optional<::RotationCommandUtils::RotationData> const& rotationData,
91 int commandVersion
92 );
93
94 MCAPI static ::std::unique_ptr<::CommandArea> getCommandAreaForTargets(
95 ::CommandOrigin const& origin,
97 ::Vec3 destination,
98 int commandVersion,
99 bool allowUnloadedChunks
100 );
101
102 MCAPI static void setup(::CommandRegistry& registry);
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCAPI void* $ctor();
109 // NOLINTEND
110
111public:
112 // virtual function thunks
113 // NOLINTBEGIN
114 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
115 // NOLINTEND
116
117public:
118 // vftables
119 // NOLINTBEGIN
120 MCNAPI static void** $vftable();
121 // NOLINTEND
122};
Definition Actor.h:103
Definition AutomaticID.h:6
Definition CommandArea.h:5
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:45
Definition CommandSelectorResults.h:6
Definition Command.h:17
Definition Dimension.h:83
Definition TeleportCommand.h:27
static MCAPI void ** $vftable()
Definition TeleportTarget.h:14
Definition Vec3.h:10