LeviLamina
Loading...
Searching...
No Matches
BaseCommandBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/safety/RedactableString.h"
7
8// auto generated forward declare list
9// clang-format off
10class BlockPos;
11class BlockSource;
12class Command;
13class CommandOrigin;
14class CompoundTag;
15class DataLoadHelper;
16class Level;
17struct ActorUniqueID;
18// clang-format on
19
20class BaseCommandBlock {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 32, ::std::string> mLastOutputId;
25 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLastOutputParams;
26 ::ll::TypedStorage<8, 32, ::std::string> mCommand;
27 ::ll::TypedStorage<8, 72, ::Bedrock::Safety::RedactableString> mName;
28 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Command>> mCompiledCommand;
29 ::ll::TypedStorage<8, 8, uint64> mLastExecution;
30 ::ll::TypedStorage<4, 4, int> mVersion;
31 ::ll::TypedStorage<4, 4, int> mSuccessCount;
32 ::ll::TypedStorage<4, 4, int> mTickDelay;
33 ::ll::TypedStorage<1, 1, bool> mExecuteOnFirstTick;
34 ::ll::TypedStorage<1, 1, bool> mTrackOutput;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 BaseCommandBlock& operator=(BaseCommandBlock const&);
40 BaseCommandBlock(BaseCommandBlock const&);
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI BaseCommandBlock();
46
47 MCAPI bool _performCommand(::BlockSource& region, ::CommandOrigin const& origin, bool& markForSaving);
48
49 MCAPI void _setCommand(::BlockSource& region, ::CommandOrigin const& origin, ::std::string const& command);
50
51 MCAPI void compile(::CommandOrigin const& origin, ::Level& level);
52
53 MCFOLD ::std::string const& getCommand() const;
54
55 MCAPI ::std::string getLastOutput() const;
56
57 MCAPI ::Bedrock::Safety::RedactableString const& getName() const;
58
59#ifdef LL_PLAT_C
60 MCFOLD ::Bedrock::Safety::RedactableString const& getRawName() const;
61#endif
62
63 MCFOLD int getTickDelay() const;
64
65 MCAPI bool getTrackOutput() const;
66
67 MCAPI void load(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
68
69 MCAPI ::BaseCommandBlock& operator=(::BaseCommandBlock&&);
70
71 MCAPI bool performCommand(::BlockSource& region, ::ActorUniqueID const& minecartId);
72
73 MCAPI bool save(::CompoundTag& tag) const;
74
75 MCAPI void setCommand(::BlockSource& region, ::ActorUniqueID const& entityId, ::std::string const& command);
76
77 MCAPI void setCommand(::BlockSource& region, ::BlockPos const& pos, ::std::string const& command);
78
79 MCAPI void setLastOutput(::std::string const& lastOutput, ::std::vector<::std::string> const& params);
80
81 MCAPI void setName(::Bedrock::Safety::RedactableString const& name);
82
83 MCFOLD void setShouldExecuteOnFirstTick(bool shouldExecute);
84
85 MCAPI void setTickDelay(int tickDelay);
86
87 MCAPI void setTrackOutput(bool trackOutput);
88
89 MCFOLD bool shouldExecuteOnFirstTick() const;
90
91 MCAPI ~BaseCommandBlock();
92 // NOLINTEND
93
94public:
95 // static variables
96 // NOLINTBEGIN
97 MCAPI static ::Bedrock::Safety::RedactableString const& DefaultCommandBlockName();
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI void* $ctor();
104 // NOLINTEND
105
106public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCAPI void $dtor();
110 // NOLINTEND
111};
Definition RedactableString.h:10
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition CommandOrigin.h:32
Definition Command.h:18
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition Level.h:255
Definition ActorUniqueID.h:10