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