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