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() = default;
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&) 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>> _getSpreadWrappingAround(
57 ::IBlockWorldGenAPI& target,
58 ::Block const& self,
59 ::BlockPos const& pos,
60 uchar startingFace,
61 uchar spreadDirection
62 ) const;
63
64 MCAPI ::std::optional<::std::pair<::BlockPos const, uchar const>> getSpreadFromFaceTowardDirection(
65 ::IBlockWorldGenAPI& target,
66 ::Block const& self,
67 ::Block const& block,
68 ::BlockPos const& pos,
69 uchar startingFace,
70 uchar spreadDirection
71 ) const;
72
73 MCAPI int spreadFromAllFacesTowardAllDirections(
74 ::IBlockWorldGenAPI& target,
75 ::Block const& self,
76 ::Block const& block,
77 ::BlockPos const& pos
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 // NOLINTEND
97
98public:
99 // static variables
100 // NOLINTBEGIN
101 MCAPI static ::std::vector<::MultifaceSpreader::SpreadType> const& ALL_SPREAD_TYPES();
102
103 MCAPI static ::std::vector<::MultifaceSpreader::SpreadType> const& SAME_POSITION_ONLY();
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCAPI void* $ctor(::std::vector<::MultifaceSpreader::SpreadType> const& spreadTypes);
110 // NOLINTEND
111
112public:
113 // virtual function thunks
114 // NOLINTBEGIN
115 MCAPI bool $_canSpreadFrom(::Block const& block, uchar const facing) const;
116
117 MCAPI bool $_canSpreadInto(
118 ::IBlockWorldGenAPI& target,
119 ::Block const& self,
120 ::BlockPos const& pos,
121 uchar const placementDirection
122 ) const;
123
124 MCFOLD bool $_isOtherBlockValidAsSource(::Block const&) const;
125
126
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftable();
133 // NOLINTEND
134};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition IBlockWorldGenAPI.h:25
static MCAPI void ** $vftable()