LeviLamina
Loading...
Searching...
No Matches
MusicCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelEvent.h"
7#include "mc/server/commands/Command.h"
8#include "mc/sound/MusicRepeatMode.h"
9
10// auto generated forward declare list
11// clang-format off
12class CommandOrigin;
13class CommandOutput;
14class CommandRegistry;
15class CompoundTag;
16// clang-format on
17
18class MusicCommand : public ::Command {
19public:
20 // MusicCommand inner types declare
21 // clang-format off
22 struct CommandData;
23 // clang-format on
24
25 // MusicCommand inner types define
26 enum class Action : uchar {
27 None = 0,
28 Queue = 1,
29 Play = 2,
30 Stop = 3,
31 Volume = 4,
32 };
33
34 struct CommandData {
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<1, 1, ::MusicCommand::Action> mAction;
39 ::ll::TypedStorage<8, 32, ::std::string> mTrackName;
40 ::ll::TypedStorage<4, 4, float> mVolume;
41 ::ll::TypedStorage<4, 4, float> mFadeSeconds;
42 ::ll::TypedStorage<1, 1, ::MusicRepeatMode> mRepeatMode;
43 // NOLINTEND
44
45 public:
46 // member functions
47 // NOLINTBEGIN
48#ifdef LL_PLAT_C
49 MCAPI bool decodeMusicCommand(::SharedTypes::Legacy::LevelEvent type, ::CompoundTag const& data);
50#endif
51 // NOLINTEND
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<1, 1, ::MusicCommand::Action> mAction;
58 ::ll::TypedStorage<8, 32, ::std::string> mTrackName;
59 ::ll::TypedStorage<4, 4, float> mVolume;
60 ::ll::TypedStorage<4, 4, float> mFadeSeconds;
61 ::ll::TypedStorage<1, 1, ::MusicRepeatMode> mRepeatMode;
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 // member functions
72 // NOLINTBEGIN
73 MCAPI void _handleActionQueueOrPlay(::CompoundTag& data, ::CommandOutput& output) const;
74
75 MCAPI void _handleActionStop(::CompoundTag& data, ::CommandOutput& output) const;
76
77 MCAPI void _handleActionVolume(::CompoundTag& data, ::CommandOutput& output) const;
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static void setup(::CommandRegistry& registry);
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
90
91
92 // NOLINTEND
93};
Definition CommandOrigin.h:32
Definition CommandOutput.h:20
Definition CommandRegistry.h:51
Definition Command.h:17
Definition CompoundTag.h:18
Definition MusicCommand.h:18
Definition MusicCommand.h:34