LeviLamina
Loading...
Searching...
No Matches
BlockRedstoneProducerComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/EnumSet.h"
7#include "mc/legacy/facing/Name.h"
8#include "mc/world/Direction.h"
9#include "mc/world/level/block/components/IBlockComponent.h"
10
11// auto generated forward declare list
12// clang-format off
13class Block;
14class BlockPos;
15class BlockSource;
17namespace BlockEvents { class BlockPlaceEvent; }
18namespace BlockEvents { class BlockStateChangeEvent; }
19// clang-format on
20
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<1, 1, schar> mPower;
26 ::ll::TypedStorage<1, 1, uchar> mStronglyPoweredFace;
27 ::ll::TypedStorage<1, 1, ::Bedrock::EnumSet<::Facing::Name, 6>> mConnectedFaces;
28 ::ll::TypedStorage<1, 1, bool> mIsTransformRelative;
29 ::ll::TypedStorage<1, 1, bool> mAllowPowerUp;
30 ::ll::TypedStorage<1, 1, bool> mAllowPowerDown;
31 ::ll::TypedStorage<1, 1, bool> mSetSignalStrengthOnRedstoneComponentSetup;
32 // NOLINTEND
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI void finalize(::BlockTransformationComponent const* transformationComponent);
38
39 MCAPI void onEvent(::BlockEvents::BlockPlaceEvent const& ev) const;
40
41 MCAPI void onEvent(::BlockEvents::BlockStateChangeEvent const& ev) const;
42 // NOLINTEND
43
44public:
45 // static functions
46 // NOLINTBEGIN
47 MCAPI static bool const isSignalSource(::Block const& block);
48
49 MCAPI static void setRedstoneSignal(::Block const& block, ::BlockSource& region, ::BlockPos const& pos);
50
51 MCAPI static void setupRedstoneComponent(::Block const& block, ::BlockSource& region, ::BlockPos const& pos);
52
53#ifdef LL_PLAT_C
54 MCAPI static bool const shouldConnectToRedstone(::Block const& block, ::Direction::Type direction);
55#endif
56 // NOLINTEND
57};
Definition BlockPlaceEvent.h:18
Definition BlockStateChangeEvent.h:17
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BlockTransformationComponent.h:9
Definition Block.h:69
Definition BlockRedstoneProducerComponent.h:21
Definition IBlockComponent.h:5