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