LeviLamina
Loading...
Searching...
No Matches
BaseCircuitComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/RefCountedSet.h"
7#include "mc/world/redstone/circuit/components/CircuitComponentList.h"
8#include "mc/world/redstone/circuit/components/CircuitComponentType.h"
9#include "mc/world/redstone/circuit/components/RedstoneLogicExecutionFlags.h"
10
11// auto generated forward declare list
12// clang-format off
13class BlockPos;
16class CircuitSystem;
18// clang-format on
19
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 24, ::CircuitComponentList> mSources;
25 ::ll::TypedStorage<8, 16, ::Core::RefCountedSet<::BaseCircuitComponent*>> mDestinations;
26 ::ll::TypedStorage<1, 1, bool> mIgnoreFirstUpdate;
27 ::ll::TypedStorage<1, 1, bool> mIsFirstTime;
28 ::ll::TypedStorage<1, 1, bool> mNeedsUpdate;
29 ::ll::TypedStorage<4, 12, ::BlockPos> mPos;
30 ::ll::TypedStorage<4, 12, ::BlockPos> mChunkPosition;
31 ::ll::TypedStorage<1, 1, bool> mShouldEvaluate;
32 ::ll::TypedStorage<4, 4, int> mStrength;
33 ::ll::TypedStorage<1, 1, uchar> mDirection;
34 ::ll::TypedStorage<1, 1, bool> mAllowPowerUp;
35 ::ll::TypedStorage<1, 1, bool> mAllowPowerDown;
36 ::ll::TypedStorage<1, 1, bool> mRemoved;
37 ::ll::TypedStorage<1, 1, bool> mConsumePowerAnyDirection;
38 ::ll::TypedStorage<8, 8, ::CircuitComponentType> mCircuitComponentType;
39 // NOLINTEND
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 // vIndex: 0
45 virtual ~BaseCircuitComponent();
46
47 // vIndex: 1
48 virtual int getStrength() const;
49
50 // vIndex: 2
51 virtual int getDirection() const;
52
53 // vIndex: 3
54 virtual void setStrength(int strength);
55
56 // vIndex: 4
57 virtual void setDirection(uchar direction);
58
59 // vIndex: 5
60 virtual void setConsumePowerAnyDirection(bool canConsumePowerAnyDirection);
61
62 // vIndex: 6
63 virtual bool canConsumePowerAnyDirection() const;
64
65 // vIndex: 7
66 virtual bool canConsumerPower() const;
67
68 // vIndex: 8
69 virtual bool canStopPower() const;
70
71 // vIndex: 9
72 virtual void setStopPower(bool bPower);
73
74 // vIndex: 10
75 virtual void removeSource(::BlockPos const& posSource, ::BaseCircuitComponent const* pComponent);
76
77 // vIndex: 11
78 virtual bool
79 addSource(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, int& dampening, bool& bDirectlyPowered);
80
81 // vIndex: 12
82 virtual bool allowConnection(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, bool& bDirectlyPowered);
83
84 // vIndex: 13
85 virtual void checkLock(::CircuitSystem& system, ::BlockPos const& pos);
86
87 // vIndex: 14
88 virtual bool evaluate(::CircuitSystem& system, ::BlockPos const& pos);
89
90 // vIndex: 15
91 virtual void cacheValues(::CircuitSystem& system, ::BlockPos const& pos);
92
93 // vIndex: 16
94 virtual void updateDependencies(::CircuitSceneGraph& system, ::BlockPos const& pos);
95
96 // vIndex: 17
97 virtual ::RedstoneLogicExecutionFlags getLogicExecutionFlags() const;
98
99 // vIndex: 18
100 virtual bool allowIndirect() const;
101
102 // vIndex: 19
103 virtual bool isHalfPulse() const;
104
105 // vIndex: 20
106 virtual bool hasSource(::BaseCircuitComponent const& source) const;
107
108 // vIndex: 21
109 virtual bool hasChildrenSource() const;
110
111 // vIndex: 22
112 virtual bool isSecondaryPowered() const;
113
114 // vIndex: 23
115 virtual void removeFromAnySourceList(::BaseCircuitComponent const* component);
116
117 // vIndex: 24
118 virtual ::CircuitComponentType getCircuitComponentType() const;
119
120 // vIndex: 25
121 virtual ::CircuitComponentType getCircuitComponentGroupType() const;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
127 MCAPI void addSourceItem(::CircuitComponentList::Item const& item);
128
129 MCAPI bool trackPowerSource(
130 ::CircuitTrackingInfo const& info,
131 int dampening,
132 bool directlyPowered,
133 int data,
134 bool isDirectional
135 );
136 // NOLINTEND
137
138public:
139 // destructor thunk
140 // NOLINTBEGIN
141 MCAPI void $dtor();
142 // NOLINTEND
143
144public:
145 // virtual function thunks
146 // NOLINTBEGIN
147 MCFOLD int $getStrength() const;
148
149 MCFOLD int $getDirection() const;
150
151 MCAPI void $setStrength(int strength);
152
153 MCAPI void $setDirection(uchar direction);
154
155 MCFOLD void $setConsumePowerAnyDirection(bool canConsumePowerAnyDirection);
156
157 MCFOLD bool $canConsumePowerAnyDirection() const;
158
159 MCFOLD bool $canConsumerPower() const;
160
161 MCFOLD bool $canStopPower() const;
162
163 MCFOLD void $setStopPower(bool bPower);
164
165 MCAPI void $removeSource(::BlockPos const& posSource, ::BaseCircuitComponent const* pComponent);
166
167 MCFOLD bool
168 $addSource(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, int& dampening, bool& bDirectlyPowered);
169
170 MCFOLD bool $allowConnection(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, bool& bDirectlyPowered);
171
172 MCFOLD void $checkLock(::CircuitSystem& system, ::BlockPos const& pos);
173
174 MCFOLD bool $evaluate(::CircuitSystem& system, ::BlockPos const& pos);
175
176 MCFOLD void $cacheValues(::CircuitSystem& system, ::BlockPos const& pos);
177
178 MCFOLD void $updateDependencies(::CircuitSceneGraph& system, ::BlockPos const& pos);
179
180 MCFOLD ::RedstoneLogicExecutionFlags $getLogicExecutionFlags() const;
181
182 MCFOLD bool $allowIndirect() const;
183
184 MCFOLD bool $isHalfPulse() const;
185
186 MCAPI bool $hasSource(::BaseCircuitComponent const& source) const;
187
188 MCFOLD bool $hasChildrenSource() const;
189
190 MCFOLD bool $isSecondaryPowered() const;
191
192 MCAPI void $removeFromAnySourceList(::BaseCircuitComponent const* component);
193
194 MCFOLD ::CircuitComponentType $getCircuitComponentType() const;
195
196 MCAPI ::CircuitComponentType $getCircuitComponentGroupType() const;
197 // NOLINTEND
198
199public:
200 // vftables
201 // NOLINTBEGIN
202 MCAPI static void** $vftable();
203 // NOLINTEND
204};
Definition BaseCircuitComponent.h:20
Definition BlockPos.h:18
Definition CircuitComponentList.h:20
Definition CircuitComponentList.h:12
Definition CircuitSceneGraph.h:19
Definition CircuitSystem.h:13
Definition CircuitTrackingInfo.h:14