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& 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 spreadFromFaceTowardAllDirections(
66 ::IBlockWorldGenAPI& target,
67 ::Block const& self,
68 ::Block const& block,
69 ::BlockPos const& pos,
70 uchar startingFace
71 ) const;
72
73 MCAPI bool spreadFromFaceTowardDirection(
74 ::BlockSource& region,
75 ::Block const& self,
76 ::Block const& block,
77 ::BlockPos const& pos,
78 uchar startingFace,
79 uchar spreadDirection
80 ) const;
81
82 MCAPI bool spreadFromFaceTowardRandomDirection(
83 ::IBlockWorldGenAPI& target,
84 ::Block const& self,
85 ::Block const& block,
86 ::BlockPos const& pos,
87 uchar startingFace
88 ) const;
89
90 MCAPI bool spreadFromRandomFaceTowardRandomDirection(
91 ::IBlockWorldGenAPI& target,
92 ::Block const& self,
93 ::Block const& block,
94 ::BlockPos const& pos
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& block) const;
125
126
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCAPI static void** $vftable();
133 // NOLINTEND
134};
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Block.h:41
Definition IBlockWorldGenAPI.h:25