LeviLamina
Loading...
Searching...
No Matches
BlockConnectionComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/NeighborBlockDirections.h"
7
8// auto generated forward declare list
9// clang-format off
10class Block;
11class BlockPos;
12class BlockSource;
13class BlockType;
14namespace BlockTrait { class IConnectionUpdateCallback; }
15// clang-format on
16
17class BlockConnectionComponent {
18public:
19 // BlockConnectionComponent inner types declare
20 // clang-format off
22 struct ConnectionData;
23 // clang-format on
24
25 // BlockConnectionComponent inner types define
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 8, ::gsl::not_null<::Block const*>> mBlock;
31 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
32 // NOLINTEND
33 };
34
36 public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<2, 2, ::NeighborBlockDirections> mDirections;
40 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTrait::IConnectionUpdateCallback>> mUpdateCallback;
41 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
42 // NOLINTEND
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<8, 24, ::std::vector<::BlockConnectionComponent::ConnectionData>> mConnectionData;
49 // NOLINTEND
50
51public:
52 // prevent constructor by default
53 BlockConnectionComponent& operator=(BlockConnectionComponent const&);
54 BlockConnectionComponent(BlockConnectionComponent const&);
55
56public:
57 // member functions
58 // NOLINTBEGIN
59 MCAPI BlockConnectionComponent();
60
61 MCAPI void addCallback(
62 ::BlockType& blockType,
63 ::NeighborBlockDirections neighborBlockDirections,
64 ::std::unique_ptr<::BlockTrait::IConnectionUpdateCallback> callback,
65 int updateFlags
66 );
67
68 MCAPI ::Block const& handleConnectionUpdate(
69 ::BlockSource& region,
70 ::Block const& block,
71 ::BlockPos const& pos,
72 ::NeighborBlockDirections neighborDirections
73 ) const;
74
75 MCAPI ::BlockConnectionComponent& operator=(::BlockConnectionComponent&&);
76
77 MCAPI ~BlockConnectionComponent();
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCFOLD void* $ctor();
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCFOLD void $dtor();
90 // NOLINTEND
91};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition IConnectionUpdateCallback.h:15
Definition BlockType.h:84
Definition Block.h:69
Definition NeighborBlockDirections.h:14
Definition BlockConnectionComponent.h:26
Definition BlockConnectionComponent.h:35