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 virtual ~BaseCircuitComponent();
44
45 virtual int getStrength() const;
46
47 virtual int getDirection() const;
48
49 virtual void setStrength(int strength);
50
51 virtual void setDirection(uchar direction);
52
53 virtual void setConsumePowerAnyDirection(bool canConsumePowerAnyDirection);
54
55 virtual bool canConsumePowerAnyDirection() const;
56
57 virtual bool canConsumerPower() const;
58
59 virtual bool canStopPower() const;
60
61 virtual void setStopPower(bool bPower);
62
63 virtual void removeSource(::BlockPos const& posSource, ::BaseCircuitComponent const* pComponent);
64
65 virtual bool
66 addSource(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, int& dampening, bool& bDirectlyPowered);
67
68 virtual bool allowConnection(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, bool& bDirectlyPowered);
69
70 virtual void checkLock(::CircuitSystem& system, ::BlockPos const& pos);
71
72 virtual bool evaluate(::CircuitSystem& system, ::BlockPos const& pos);
73
74 virtual void cacheValues(::CircuitSystem& system, ::BlockPos const& pos);
75
76 virtual void updateDependencies(::CircuitSceneGraph& system, ::BlockPos const& pos);
77
78 virtual ::RedstoneLogicExecutionFlags getLogicExecutionFlags() const;
79
80 virtual bool allowIndirect() const;
81
82 virtual bool isHalfPulse() const;
83
84 virtual bool hasSource(::BaseCircuitComponent const& source) const;
85
86 virtual bool hasChildrenSource() const;
87
88 virtual bool isSecondaryPowered() const;
89
90 virtual void removeFromAnySourceList(::BaseCircuitComponent const* component);
91
92 virtual ::CircuitComponentType getCircuitComponentType() const;
93
94 virtual ::CircuitComponentType getCircuitComponentGroupType() const;
95 // NOLINTEND
96
97public:
98 // member functions
99 // NOLINTBEGIN
100 MCAPI void addSourceItem(::CircuitComponentList::Item const& item);
101
102 MCAPI bool trackPowerSource(
103 ::CircuitTrackingInfo const& info,
104 int dampening,
105 bool directlyPowered,
106 int data,
107 bool isDirectional
108 );
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCFOLD int $getStrength() const;
121
122 MCFOLD int $getDirection() const;
123
124 MCFOLD void $setStrength(int strength);
125
126 MCAPI void $setDirection(uchar direction);
127
128 MCFOLD void $setConsumePowerAnyDirection(bool canConsumePowerAnyDirection);
129
130 MCFOLD bool $canConsumePowerAnyDirection() const;
131
132 MCFOLD bool $canConsumerPower() const;
133
134 MCFOLD bool $canStopPower() const;
135
136 MCFOLD void $setStopPower(bool bPower);
137
138 MCAPI void $removeSource(::BlockPos const& posSource, ::BaseCircuitComponent const* pComponent);
139
140 MCFOLD bool
141 $addSource(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, int& dampening, bool& bDirectlyPowered);
142
143 MCFOLD bool $allowConnection(::CircuitSceneGraph& graph, ::CircuitTrackingInfo const& info, bool& bDirectlyPowered);
144
145 MCFOLD void $checkLock(::CircuitSystem& system, ::BlockPos const& pos);
146
147 MCFOLD bool $evaluate(::CircuitSystem& system, ::BlockPos const& pos);
148
149 MCFOLD void $cacheValues(::CircuitSystem& system, ::BlockPos const& pos);
150
151 MCFOLD void $updateDependencies(::CircuitSceneGraph& system, ::BlockPos const& pos);
152
153 MCFOLD ::RedstoneLogicExecutionFlags $getLogicExecutionFlags() const;
154
155 MCFOLD bool $allowIndirect() const;
156
157 MCFOLD bool $isHalfPulse() const;
158
159 MCAPI bool $hasSource(::BaseCircuitComponent const& source) const;
160
161 MCFOLD bool $hasChildrenSource() const;
162
163 MCFOLD bool $isSecondaryPowered() const;
164
165 MCAPI void $removeFromAnySourceList(::BaseCircuitComponent const* component);
166
167 MCFOLD ::CircuitComponentType $getCircuitComponentType() const;
168
169 MCAPI ::CircuitComponentType $getCircuitComponentGroupType() const;
170
171
172 // NOLINTEND
173
174public:
175 // vftables
176 // NOLINTBEGIN
177 MCAPI static void** $vftable();
178 // NOLINTEND
179};
Definition BaseCircuitComponent.h:19
Definition BlockPos.h:19
Definition CircuitComponentList.h:22
Definition CircuitSceneGraph.h:18
Definition CircuitSystem.h:15
Definition CircuitTrackingInfo.h:14