LeviLamina
Loading...
Searching...
No Matches
MultifaceFeature.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/small_vector.h"
7#include "mc/world/level/block/BlockDescriptor.h"
8#include "mc/world/level/levelgen/feature/IFeature.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class BlockSource;
14class LevelChunk;
15class Random;
16// clang-format on
17
18class MultifaceFeature : public ::IFeature {
19public:
20 // MultifaceFeature inner types define
21 using ShuffledFaces = ::Bedrock::small_vector<uchar, 6>;
22
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 176, ::BlockDescriptor> mBlock;
27 ::ll::TypedStorage<4, 4, int> mSearchRange;
28 ::ll::TypedStorage<1, 1, bool> mCanPlaceOnFloor;
29 ::ll::TypedStorage<1, 1, bool> mCanPlaceOnCeiling;
30 ::ll::TypedStorage<1, 1, bool> mCanPlaceOnWall;
31 ::ll::TypedStorage<4, 4, float> mChanceOfSpreading;
32 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mCanBePlacedOn;
33 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mValidDirections;
34 // NOLINTEND
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const /*override*/;
40 // NOLINTEND
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI MultifaceFeature();
46
47 MCAPI ::std::optional<::BlockPos> _placeBlockIfPossible(
48 ::BlockSource& region,
49 ::BlockPos const& pos,
50 ::Random& random,
51 ::gsl::span<uchar const> placementDirections
52 ) const;
53 // NOLINTEND
54
55public:
56 // static functions
57 // NOLINTBEGIN
58 MCAPI static bool _isNeighbourBlockChunkReady(
59 ::BlockSource& region,
60 ::BlockPos const& neighbourPos,
61 ::LevelChunk const* currentChunk
62 );
63
64 MCAPI static void
65 _shuffledDirectionsExcept(::Bedrock::small_vector<uchar, 6>& out, uchar exclude, ::gsl::span<uchar const> faces);
66 // NOLINTEND
67
68public:
69 // constructor thunks
70 // NOLINTBEGIN
71 MCAPI void* $ctor();
72 // NOLINTEND
73
74public:
75 // virtual function thunks
76 // NOLINTBEGIN
77 MCAPI ::std::optional<::BlockPos> $place(::IFeature::PlacementContext const& context) const;
78
79
80 // NOLINTEND
81
82public:
83 // vftables
84 // NOLINTBEGIN
85 MCNAPI static void** $vftable();
86 // NOLINTEND
87};
Definition small_vector.h:8
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition IFeature.h:19
Definition LevelChunk.h:87
static MCAPI void ** $vftable()
Definition Random.h:10
Definition IFeature.h:27
Definition context.h:5