Skip to content
LeviMC
English
AutoLightDark
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/math/Vec3.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/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 CommandOrigin;
17class CommandOutput;
18class CommandRegistry;
19class TeleportTarget;
20struct DimensionType;
21namespace RotationCommandUtils { class RotationData; }
22// clang-format on
23
24class TeleportCommand : public ::Command {
25public:
26 // TeleportCommand inner types declare
27 // clang-format off
28 struct mApplyTeleport;
29 // clang-format on
30
31 // TeleportCommand inner types define
32 struct mApplyTeleport {};
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<
38 8,
39 64,
40 ::std::function<void(
41 ::Actor&,
42 ::Vec3,
43 ::Vec3*,
45 ::std::optional<::RotationCommandUtils::RotationData> const&,
46 int
47 )>>
49 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mTargets;
50 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mDestinationEntity;
51 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mDestinationPos;
52 ::ll::TypedStorage<8, 200, ::CommandSelector<::Actor>> mFacingEntity;
53 ::ll::TypedStorage<4, 16, ::CommandPositionFloat> mFacingPos;
54 ::ll::TypedStorage<4, 8, ::RelativeFloat> mYRot;
55 ::ll::TypedStorage<4, 8, ::RelativeFloat> mXRot;
56 ::ll::TypedStorage<4, 4, ::RotationCommandUtils::FacingResult> mHaveFacing;
57 ::ll::TypedStorage<1, 1, bool> mDestinationIsPosition;
58 ::ll::TypedStorage<1, 1, bool> mIsUsingRotation;
59 ::ll::TypedStorage<1, 1, bool> mFacingIsPosition;
60 ::ll::TypedStorage<1, 1, bool> mCheckForBlocks;
61 ::ll::TypedStorage<1, 1, bool> mForceProvidedPositionOnDimensionChange;
62 // NOLINTEND
63
64public:
65 // virtual functions
66 // NOLINTBEGIN
67 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
68 // NOLINTEND
69
70public:
71 // static functions
72 // NOLINTBEGIN
73 MCAPI static void applyTarget(::Actor& victim, ::TeleportTarget target, int commandVersion, bool keepVelocity);
74
75 MCAPI static ::TeleportTarget computeTarget(
76 ::Actor& victim,
77 ::Vec3 destination,
78 ::Vec3* facePosition,
79 ::DimensionType destinationDimension,
80 ::std::optional<::RotationCommandUtils::RotationData> const& rotationData,
81 int commandVersion
82 );
83
84 MCAPI static void setup(::CommandRegistry& registry);
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCNAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
91
92
93 // NOLINTEND
94};
Definition Actor.h:116
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition Command.h:17
Definition RotationData.h:13
Definition TeleportCommand.h:24
MCAPI void $execute(::CommandOrigin const &origin, ::CommandOutput &output) const
Definition TeleportTarget.h:14
Definition Vec3.h:10
Definition DimensionType.h:5
Definition TeleportCommand.h:32