LeviLamina
Loading...
Searching...
No Matches
MultifaceSpreader.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class Block;
8class BlockPos;
9class BlockSource;
11// clang-format on
12
13class MultifaceSpreader {
14public:
15 // MultifaceSpreader inner types define
16 enum class SpreadType : uchar {
17 SamePosition = 0,
18 SamePlane = 1,
19 WrapAround = 2,
20 };
21
22 using SpreadTypes = ::std::vector<::MultifaceSpreader::SpreadType>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 24, ::std::vector<::MultifaceSpreader::SpreadType>> mSpreadTypes;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 MultifaceSpreader();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ~MultifaceSpreader();
38
39 virtual bool _canSpreadFrom(::Block const& block, uchar const facing) const;
40
41 virtual bool _canSpreadInto(
42 ::IBlockWorldGenAPI& target,
43 ::Block const& self,
44 ::BlockPos const& pos,
45 uchar const placementDirection
46 ) const;
47
48 virtual bool _isOtherBlockValidAsSource(::Block const& block) const;
49 // NOLINTEND
50
51public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI explicit MultifaceSpreader(::std::vector<::MultifaceSpreader::SpreadType> const& spreadTypes);
55
56 MCAPI ::std::optional<::std::pair<::BlockPos const, uchar const>> getSpreadFromFaceTowardDirection(
57 ::IBlockWorldGenAPI& target,
58 ::Block const& self,
59 ::Block const& block,
60 ::BlockPos const& pos,
61 uchar startingFace,
62 uchar spreadDirection
63 ) const;
64
65 MCAPI int spreadFromAllFacesTowardAllDirections(
66 ::IBlockWorldGenAPI& target,
67 ::Block const& self,
68 ::Block const& block,
69 ::BlockPos const& pos
70 ) const;
71
72 MCAPI int spreadFromFaceTowardAllDirections(
73 ::IBlockWorldGenAPI& target,
74 ::Block const& self,
75 ::Block const& block,
76 ::BlockPos const& pos,
77 uchar startingFace
78 ) const;
79
80 MCAPI bool spreadFromFaceTowardDirection(
81 ::BlockSource& region,
82 ::Block const& self,
83 ::Block const& block,
84 ::BlockPos const& pos,
85 uchar startingFace,
86 uchar spreadDirection
87 ) const;
88
89 MCAPI bool spreadFromFaceTowardRandomDirection(
90 ::IBlockWorldGenAPI& target,
91 ::Block const& self,
92 ::Block const& block,
93 ::BlockPos const& pos,
94 uchar startingFace
95 ) const;
96
97 MCAPI bool spreadFromRandomFaceTowardRandomDirection(
98 ::IBlockWorldGenAPI& target,
99 ::Block const& self,
100 ::Block const& block,
101 ::BlockPos const& pos
102 ) const;
103 // NOLINTEND
104
105public:
106 // static variables
107 // NOLINTBEGIN
108 MCAPI static ::std::vector<::MultifaceSpreader::SpreadType> const& ALL_SPREAD_TYPES();
109
110 MCAPI static ::std::vector<::MultifaceSpreader::SpreadType> const& SAME_POSITION_ONLY();
111 // NOLINTEND
112
113public:
114 // constructor thunks
115 // NOLINTBEGIN
116 MCAPI void* $ctor(::std::vector<::MultifaceSpreader::SpreadType> const& spreadTypes);
117 // NOLINTEND
118
119public:
120 // destructor thunk
121 // NOLINTBEGIN
122 MCAPI void $dtor();
123 // NOLINTEND
124
125public:
126 // virtual function thunks
127 // NOLINTBEGIN
128 MCAPI bool $_canSpreadFrom(::Block const& block, uchar const facing) const;
129
130 MCAPI bool $_canSpreadInto(
131 ::IBlockWorldGenAPI& target,
132 ::Block const& self,
133 ::BlockPos const& pos,
134 uchar const placementDirection
135 ) const;
136
137 MCFOLD bool $_isOtherBlockValidAsSource(::Block const& block) const;
138
139
140 // NOLINTEND
141
142public:
143 // vftables
144 // NOLINTBEGIN
145 MCAPI static void** $vftable();
146 // NOLINTEND
147};
Definition BlockPos.h:21
Definition BlockSource.h:72
Definition Block.h:69
Definition IBlockWorldGenAPI.h:25