LeviLamina
Loading...
Searching...
No Matches
CommandBlockActor.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/world/level/block/CommandBlockMode.h"
8#include "mc/world/level/block/actor/BlockActor.h"
9
10// auto generated forward declare list
11// clang-format off
14class BlockPos;
15class BlockSource;
16class CommandBlock;
17class CompoundTag;
18class DataLoadHelper;
19class ILevel;
20class Player;
22class SaveContext;
23namespace Bedrock::Safety { class RedactableString; }
24// clang-format on
25
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 192, ::BaseCommandBlock> mBaseCB;
31 ::ll::TypedStorage<1, 1, bool> mPowered;
32 ::ll::TypedStorage<1, 1, bool> mConditionMet;
33 ::ll::TypedStorage<1, 1, bool> mRedstoneMode;
34 ::ll::TypedStorage<1, 1, bool> mLastPerformedConditionalMode;
35 ::ll::TypedStorage<1, 1, bool> mLastPerformedRedstoneMode;
36 ::ll::TypedStorage<1, 1, bool> mExecuteFirstTickOnPlace;
37 ::ll::TypedStorage<2, 2, ::CommandBlockMode> mLastPerformedCBMode;
38 // NOLINTEND
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 // vIndex: 2
44 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
45
46 // vIndex: 4
47 virtual void saveBlockData(::CompoundTag& tag, ::BlockSource& region) const /*override*/;
48
49 // vIndex: 1
50 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
51
52 // vIndex: 5
53 virtual void
54 loadBlockData(::CompoundTag const& tag, ::BlockSource& region, ::DataLoadHelper& dataLoadHelper) /*override*/;
55
56 // vIndex: 6
57 virtual void onCustomTagLoadDone(::BlockSource& region) /*override*/;
58
59 // vIndex: 8
60 virtual void onChanged(::BlockSource& region) /*override*/;
61
62 // vIndex: 11
63 virtual void onPlace(::BlockSource& region) /*override*/;
64
65 // vIndex: 24
66 virtual ::Bedrock::Safety::RedactableString const& getCustomName() const /*override*/;
67
68 // vIndex: 25
69 virtual ::std::string const& getFilteredCustomName(::Bedrock::NotNullNonOwnerPtr<::ProfanityContext> const& context
70 ) /*override*/;
71
72 // vIndex: 27
73 virtual void setCustomName(::Bedrock::Safety::RedactableString const& name) /*override*/;
74
75 // vIndex: 43
76 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
77
78 // vIndex: 44
79 virtual void _onUpdatePacket(::CompoundTag const& tag, ::BlockSource& region) /*override*/;
80
81 // vIndex: 45
82 virtual bool _playerCanUpdate(::Player const& player) const /*override*/;
83
84 // vIndex: 0
85 virtual ~CommandBlockActor() /*override*/ = default;
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
91 MCAPI CommandBlockActor(::BlockPos const& pos, ::CommandBlockMode mode);
92
93 MCAPI void _setAutomatic(::BlockSource& region, bool alwaysActive, ::CommandBlockMode currentMode);
94
95 MCAPI ::CommandBlock const* getCommandBlock(::BlockSource& region) const;
96
97 MCAPI bool getConditionalMode(::BlockSource& region) const;
98
99 MCAPI bool markConditionMet(::BlockSource& region);
100
101 MCAPI void markForSaving(::BlockSource& region);
102
103 MCAPI void markForSaving(::BlockSource& region, int oldSuccessCount, bool oldConditionMet);
104
105 MCAPI bool performCommand(::BlockSource& region);
106
107 MCAPI void updateBlock(
108 ::BlockSource& region,
109 ::std::string const& cmd,
111 ::CommandBlockMode newMode,
112 bool isConditional,
113 bool redstoneMode,
114 bool trackOutput,
115 int tickDelay,
116 bool executeFirstTick
117 );
118 // NOLINTEND
119
120public:
121 // constructor thunks
122 // NOLINTBEGIN
123 MCAPI void* $ctor(::BlockPos const& pos, ::CommandBlockMode mode);
124 // NOLINTEND
125
126public:
127 // destructor thunk
128 // NOLINTBEGIN
129
130 // NOLINTEND
131
132public:
133 // virtual function thunks
134 // NOLINTBEGIN
135 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
136
137 MCAPI void $saveBlockData(::CompoundTag& tag, ::BlockSource& region) const;
138
139 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
140
141 MCAPI void $loadBlockData(::CompoundTag const& tag, ::BlockSource& region, ::DataLoadHelper& dataLoadHelper);
142
143 MCAPI void $onCustomTagLoadDone(::BlockSource& region);
144
145 MCFOLD void $onChanged(::BlockSource& region);
146
147 MCAPI void $onPlace(::BlockSource& region);
148
149 MCFOLD ::Bedrock::Safety::RedactableString const& $getCustomName() const;
150
151 MCAPI ::std::string const& $getFilteredCustomName(::Bedrock::NotNullNonOwnerPtr<::ProfanityContext> const& context);
152
153 MCAPI void $setCustomName(::Bedrock::Safety::RedactableString const& name);
154
155 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
156
157 MCAPI void $_onUpdatePacket(::CompoundTag const& tag, ::BlockSource& region);
158
159 MCAPI bool $_playerCanUpdate(::Player const& player) const;
160 // NOLINTEND
161
162public:
163 // vftables
164 // NOLINTBEGIN
165 MCAPI static void** $vftable();
166 // NOLINTEND
167};
Definition BaseCommandBlock.h:16
Definition RedactableString.h:10
Definition BlockActorDataPacket.h:19
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CommandBlockActor.h:26
Definition CommandBlock.h:26
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition ILevel.h:203
Definition Player.h:119
Definition ProfanityContext.h:8
Definition SaveContext.h:5
Definition context.h:5