19class BaseCircuitComponent {
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;
44 virtual ~BaseCircuitComponent();
46 virtual int getStrength()
const;
48 virtual int getDirection()
const;
50 virtual void setOldStrength(
short strength);
52 virtual void setStrength(
int strength);
54 virtual void setDirection(uchar direction);
56 virtual void setConsumePowerAnyDirection(
bool canConsumePowerAnyDirection);
58 virtual bool canConsumePowerAnyDirection()
const;
60 virtual bool canConsumerPower()
const;
62 virtual bool canStopPower()
const;
64 virtual void setStopPower(
bool bPower);
66 virtual bool needsUpdate();
68 virtual void removeSource(
::BlockPos const& posSource, ::BaseCircuitComponent
const* pComponent);
82 virtual ::RedstoneLogicExecutionFlags getLogicExecutionFlags()
const;
84 virtual bool allowIndirect()
const;
86 virtual bool isHalfPulse()
const;
88 virtual bool hasSource(::BaseCircuitComponent
const& source)
const;
90 virtual bool hasChildrenSource()
const;
92 virtual bool isSecondaryPowered()
const;
94 virtual void removeFromAnySourceList(::BaseCircuitComponent
const* component);
96 virtual ::CircuitComponentType getCircuitComponentType()
const;
98 virtual ::CircuitComponentType getCircuitComponentGroupType()
const;
104 MCAPI BaseCircuitComponent();
108 MCAPI
short getOldStrength()
const;
110 MCFOLD
bool isRemoved()
const;
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
117 MCFOLD
void setRemoved();
119 MCAPI
bool trackPowerSource(
122 bool directlyPowered,
143 MCFOLD
int $getStrength()
const;
145 MCFOLD
int $getDirection()
const;
147 MCAPI
void $setOldStrength(
short strength);
149 MCAPI
void $setStrength(
int strength);
151 MCFOLD
void $setDirection(uchar direction);
153 MCFOLD
void $setConsumePowerAnyDirection(
bool canConsumePowerAnyDirection);
155 MCFOLD
bool $canConsumePowerAnyDirection()
const;
157 MCFOLD
bool $canConsumerPower()
const;
159 MCFOLD
bool $canStopPower()
const;
161 MCFOLD
void $setStopPower(
bool bPower);
163 MCAPI
bool $needsUpdate();
165 MCAPI
void $removeSource(
::BlockPos const& posSource, ::BaseCircuitComponent
const* pComponent);
179 MCFOLD ::RedstoneLogicExecutionFlags $getLogicExecutionFlags()
const;
181 MCFOLD
bool $allowIndirect()
const;
183 MCFOLD
bool $isHalfPulse()
const;
185 MCAPI
bool $hasSource(::BaseCircuitComponent
const& source)
const;
187 MCFOLD
bool $hasChildrenSource()
const;
189 MCFOLD
bool $isSecondaryPowered()
const;
191 MCAPI
void $removeFromAnySourceList(::BaseCircuitComponent
const* component);
193 MCFOLD ::CircuitComponentType $getCircuitComponentType()
const;
195 MCAPI ::CircuitComponentType $getCircuitComponentGroupType()
const;
203 MCAPI
static void** $vftable();