Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
TimeCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/server/commands/Command.h"
8#include "mc/server/commands/standard/ClockTimeMarkerNameCommandParam.h"
9
10// auto generated forward declare list
11// clang-format off
12class CommandOrigin;
13class CommandOutput;
14class CommandRegistry;
15class WorldClock;
17// clang-format on
18
19class TimeCommand : public ::Command {
20public:
21 // TimeCommand inner types declare
22 // clang-format off
23 struct InitProxy;
24 // clang-format on
25
26 // TimeCommand inner types define
27 enum class Mode : int {
28 Set = 0,
29 Add = 1,
30 Query = 2,
31 Pause = 3,
32 Resume = 4,
33 };
34
35 enum class Query : int {
36 DayTime = 0,
37 GameTime = 1,
38 Day = 2,
39 Time = 3,
40 };
41
42 enum class TimeMarkerOccurrence : int {
43 Next = 0,
44 Previous = 1,
45 Stay = 2,
46 };
47
48 enum class TimeSpec : int {
49 Sunrise = 0,
50 Day = 1,
51 Noon = 2,
52 Sunset = 3,
53 Night = 4,
54 Midnight = 5,
55 Unspecified = 6,
56 };
57
58 struct InitProxy {
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::WorldClockRegistry const>> mWorldClockRegistry;
63 // NOLINTEND
64 };
65
66public:
67 // member variables
68 // NOLINTBEGIN
69 ::ll::TypedStorage<4, 4, ::TimeCommand::Mode> mMode;
70 ::ll::TypedStorage<4, 4, int> mValue;
71 ::ll::TypedStorage<8, 32, ::ClockTimeMarkerNameCommandParam> mTimeMarkerName;
72 ::ll::TypedStorage<4, 4, ::TimeCommand::TimeMarkerOccurrence> mTimeMarkerOccurrence;
73 ::ll::TypedStorage<4, 4, ::TimeCommand::Query> mQuery;
74 ::ll::TypedStorage<4, 4, ::TimeCommand::TimeSpec> mSpec;
75 // NOLINTEND
76
77public:
78 // virtual functions
79 // NOLINTBEGIN
80 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCNAPI ::std::optional<int> _tryGetTimeFromTimeMarker(
87 ::WorldClock const& clock,
88 ::std::string const& timeMarkerName,
89 ::CommandOutput& output
90 ) const;
91 // NOLINTEND
92
93public:
94 // static functions
95 // NOLINTBEGIN
96 MCNAPI static void setup(::CommandRegistry& registry, ::TimeCommand::InitProxy&& dependencies);
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102 MCNAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
103
104
105 // NOLINTEND
106};
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition Command.h:17
Definition TimeCommand.h:19
MCAPI void $execute(::CommandOrigin const &origin, ::CommandOutput &output) const
static MCAPI void setup(::CommandRegistry &registry, ::TimeCommand::InitProxy &&dependencies)
MCAPI ::std::optional< int > _tryGetTimeFromTimeMarker(::WorldClock const &clock, ::std::string const &timeMarkerName, ::CommandOutput &output) const
Definition WorldClockRegistry.h:22
Definition WorldClock.h:23
Definition TimeCommand.h:58